-
Notifications
You must be signed in to change notification settings - Fork 86
GH-836: Added support of ExtensionType for ComplexCopier #837
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
base: main
Are you sure you want to change the base?
Conversation
@lidavidm Could you plz take a look? |
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.
Why do we need the factory, vs. being able to copy the "storage type" directly?
throw new UnsupportedOperationException( | ||
"EXTENSIONTYPE are not supported yet. Please provide an ExtensionTypeWriterFactory." ); |
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.
I don't think we can ever support extension without the factory right?
throw new UnsupportedOperationException( | |
"EXTENSIONTYPE are not supported yet. Please provide an ExtensionTypeWriterFactory." ); | |
throw new IllegalArgumentException( | |
"Must provide ExtensionTypeWriterFactory" ); |
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.
yep, we need a factory to determine writer impl for extension type.
@Override | ||
public void copyFrom( | ||
int fromIndex, int thisIndex, ValueVector from, ExtensionTypeWriterFactory writerFactory) { | ||
throw new UnsupportedOperationException(); |
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.
Should these be abstract methods instead?
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.
No, because this method is used only with complex type vectors and they have implementation; for non-complex, it's not supported, and this behavior is covered here
If we use just the storage type, original (extension) type/vector will be missed |
@lidavidm Would you mind taking another look at this PR when you have a chance? We would really appreciate your feedback. Thanks! |
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.
I guess my question is then, how does this work if we have more than one extension type (e.g. a struct vector with two extension type fields), given that everything is based around having 0 or 1 ExtensionTypeWriterFactory
s?
Because ExtensionTypeWriterFactory.getWriterImpl will return a writer based on vector type, so if will be several extension types - getWriterImpl should just handle this something like
|
Works for me. Incidentally, ExtensionTypeWriterFactory is type-parameterized but it seems we never actually use it that way - can you file an issue to drop that and have |
|
There's still pre-commit failures - might be worth running the formatter locally? |
@lidavidm could you re-check plz? |
What's Changed
Updated ComplexCopier to support ExtensionType - it contains two copy methods
Also updated ComplexCopier tests.
Closes #836.