Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 148
GH-891: Add ExtensionTypeWriterFactory to TransferPair#892
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
8f5bdf647a24efc2b188c6205872b848f1d577c52c5d020d4db0e41d74c9a8cc9b7808bc815ab00173774a3a4da22845dbFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -125,11 +125,12 @@ public interface ExtensionWriter extends BaseWriter { | ||
| void writeExtension(Object value); | ||
jhrotko marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| /** | ||
| * Adds the given extension type factory. This factory allows configuring writer implementations for specific ExtensionTypeVector. | ||
| * Writes the given extension type value. | ||
| * | ||
| * @param factory the extension type factory to add | ||
| * @param value the extension type value to write | ||
| * @param type of the extension | ||
| */ | ||
| void addExtensionTypeWriterFactory(ExtensionTypeWriterFactory factory); | ||
| void writeExtension(Object value, ArrowType type); | ||
| } | ||
| public interface ScalarWriter extends | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -286,7 +286,7 @@ protected void setWriter(ValueVector v) { | ||
| writer = new UnionWriter((UnionVector) vector, nullableStructWriterFactory); | ||
| break; | ||
| case EXTENSIONTYPE: | ||
| writer = new UnionExtensionWriter((ExtensionTypeVector) vector); | ||
| writer = ((ExtensionType) vector.getField().getType()).getNewFieldWriter(vector); | ||
jhrotko marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| break; | ||
| default: | ||
| writer = type.getNewFieldWriter(vector); | ||
| @@ -541,17 +541,13 @@ public void writeLargeVarChar(String value) { | ||
| } | ||
| @Override | ||
| public void writeExtension(Object value) { | ||
| getWriter(MinorType.EXTENSIONTYPE).writeExtension(value); | ||
| public void writeExtension(Object value, ArrowType arrowType) { | ||
| getWriter(MinorType.EXTENSIONTYPE, arrowType).writeExtension(value, arrowType); | ||
| } | ||
| @Override | ||
| public void addExtensionTypeWriterFactory(ExtensionTypeWriterFactory factory) { | ||
| getWriter(MinorType.EXTENSIONTYPE).addExtensionTypeWriterFactory(factory); | ||
| } | ||
| public void addExtensionTypeWriterFactory(ExtensionTypeWriterFactory factory, ArrowType arrowType) { | ||
| getWriter(MinorType.EXTENSIONTYPE, arrowType).addExtensionTypeWriterFactory(factory); | ||
| public void write(ExtensionHolder holder) { | ||
| getWriter(MinorType.EXTENSIONTYPE, holder.type()).write(holder); | ||
| } | ||
| @Override | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.