Skip to content
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

Arrow batches fields #1925

Draft
wants to merge 37 commits into
base: SNOW-873466-arrow-batches
Choose a base branch
from

Conversation

sfc-gh-astachowski
Copy link
Collaborator

Overview

Added creation of Fields matching original vectors' fields. This concerns mainly nullability of vectors.

…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());
Copy link
Collaborator Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant