-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SNOW-1731124 Arrow batches fields #1925
base: SNOW-873466-arrow-batches
Are you sure you want to change the base?
SNOW-1731124 Arrow batches fields #1925
Conversation
…e-types # Conflicts: # src/main/java/net/snowflake/client/core/arrow/fullvectorconverters/SimpleArrowFullVectorConverter.java
…e-types # Conflicts: # src/main/java/net/snowflake/client/core/arrow/fullvectorconverters/ArrowFullVectorConverter.java # src/main/java/net/snowflake/client/jdbc/ArrowResultChunk.java
…stamps # Conflicts: # src/main/java/net/snowflake/client/core/arrow/fullvectorconverters/ArrowFullVectorConverter.java
# Conflicts: # src/main/java/net/snowflake/client/core/arrow/fullvectorconverters/ArrowFullVectorConverterUtil.java # src/main/java/net/snowflake/client/jdbc/ArrowResultChunk.java # src/test/java/net/snowflake/client/jdbc/ArrowBatchesIT.java
# Conflicts: # src/main/java/net/snowflake/client/core/arrow/fullvectorconverters/ArrowFullVectorConverterUtil.java # src/main/java/net/snowflake/client/jdbc/ArrowResultChunk.java # src/test/java/net/snowflake/client/jdbc/ArrowBatchesIT.java
@@ -58,8 +65,7 @@ protected FieldVector convertVector() | |||
FieldVector convertedDataVector = | |||
ArrowFullVectorConverterUtil.convert( | |||
allocator, dataVector, context, session, timeZoneToUse, 0, valueTargetType); | |||
// TODO: change to convertedDataVector and make all necessary changes to make it work | |||
ListVector convertedListVector = initVector(vector.getName(), dataVector.getField()); | |||
ListVector convertedListVector = initVector(vector.getName(), convertedDataVector.getField()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the line that required the whole change - if we don't keep nullability properly, mapVector will complain about it's grandchildren being nullable. As the grandchildren may be of any type, all converters were affected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's add some tests to show the improvement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a unit test checking if FieldTypes behave as expected when converting a MapVector
src/main/java/net/snowflake/client/core/arrow/fullvectorconverters/VarCharVectorConverter.java
Show resolved
Hide resolved
@@ -58,8 +65,7 @@ protected FieldVector convertVector() | |||
FieldVector convertedDataVector = | |||
ArrowFullVectorConverterUtil.convert( | |||
allocator, dataVector, context, session, timeZoneToUse, 0, valueTargetType); | |||
// TODO: change to convertedDataVector and make all necessary changes to make it work | |||
ListVector convertedListVector = initVector(vector.getName(), dataVector.getField()); | |||
ListVector convertedListVector = initVector(vector.getName(), convertedDataVector.getField()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's add some tests to show the improvement
Overview
Added creation of Fields matching original vectors' fields. This concerns mainly nullability of vectors.