Skip to content

vortex: Basic Variant IO support#25

Open
AdamGS wants to merge 7 commits into
mainfrom
adamg/variant-io-support
Open

vortex: Basic Variant IO support#25
AdamGS wants to merge 7 commits into
mainfrom
adamg/variant-io-support

Conversation

@AdamGS

@AdamGS AdamGS commented May 27, 2026

Copy link
Copy Markdown

Adds basic support for variant in Vortex through the generic record-based writer.

Depends on:

Work that is still missing here:

  • min/max bounds for variant array

@AdamGS AdamGS force-pushed the adamg/variant-io-support branch from bee87b4 to a735a4d Compare June 4, 2026 12:58
@AdamGS AdamGS changed the title Adamg/variant io support Variant IO support Jun 4, 2026
@AdamGS AdamGS requested a review from robert3005 June 4, 2026 13:00
@AdamGS AdamGS changed the title Variant IO support vortex: Variant IO support Jun 4, 2026
@AdamGS AdamGS marked this pull request as ready for review June 4, 2026 13:00
@AdamGS AdamGS changed the title vortex: Variant IO support vortex: Basic Variant IO support Jun 4, 2026
@github-actions github-actions Bot added the DATA label Jun 4, 2026

@Override
public VortexValueReader<?> primitive(Type.PrimitiveType iPrimitive, Field primField) {
if (VortexSchemas.isVariantField(primField)) {

@robert3005 robert3005 Jun 9, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variant is not a primitive? I think you need to add a new top level method to VortexValueReader VortexRowReader

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no idea how or why it got there, I'll fix it.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the fix is in the visitor? LMK what you think.

@robert3005

Copy link
Copy Markdown
Member

you also have this failure

TestGenericVortex > testTypeSchema(Type) > [19] variant FAILED
    org.apache.iceberg.exceptions.RuntimeIOException: Failed to write Vortex batch
        at app//org.apache.iceberg.vortex.VortexFileAppender.flushBatch(VortexFileAppender.java:103)
        at app//org.apache.iceberg.vortex.VortexFileAppender.close(VortexFileAppender.java:129)
        at app//org.apache.iceberg.vortex.TestGenericVortex.writeAndValidate(TestGenericVortex.java:91)
        at app//org.apache.iceberg.vortex.TestGenericVortex.writeAndValidate(TestGenericVortex.java:72)
        at app//org.apache.iceberg.vortex.TestGenericVortex.writeAndValidate(TestGenericVortex.java:61)

        Caused by:
        java.io.IOException: failed to write batch
            at dev.vortex.api.VortexWriter.writeBatch(VortexWriter.java:75)
            at org.apache.iceberg.vortex.VortexFileAppender.flushBatch(VortexFileAppender.java:101)
            ... 4 more

            Caused by:
            java.lang.RuntimeException: Vortex Error: Other error: write schema mismatch: expected {id=i64, test_type=variant?, trailing_data=utf8}, got {id=i64, test_type={metadata=binary, value=binary?}?, trailing_data=utf8}
                at dev.vortex.jni.NativeWriter.writeBatch(Native Method)
                at dev.vortex.api.VortexWriter.writeBatch(VortexWriter.java:73)
                ... 5 more

@AdamGS

AdamGS commented Jun 9, 2026

Copy link
Copy Markdown
Author

I think the failure is fixed in upstream Voretx.

AdamGS added 7 commits June 9, 2026 17:10
Signed-off-by: Adam Gutglick <adam@spiraldb.com>
Signed-off-by: Adam Gutglick <adam@spiraldb.com>
Signed-off-by: Adam Gutglick <adam@spiraldb.com>
Signed-off-by: Adam Gutglick <adam@spiraldb.com>
Signed-off-by: Adam Gutglick <adam@spiraldb.com>
Signed-off-by: Adam Gutglick <adam@spiraldb.com>
Signed-off-by: Adam Gutglick <adam@spiraldb.com>
@AdamGS AdamGS force-pushed the adamg/variant-io-support branch from ecf2a25 to feb347b Compare June 9, 2026 16:22
@AdamGS

AdamGS commented Jun 9, 2026

Copy link
Copy Markdown
Author

ok now there's some spark stuff I need to fix, will get to it later this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants