feat(isthmus): support Substrait struct literal conversions#677
Merged
feat(isthmus): support Substrait struct literal conversions#677
Conversation
dfc898c to
569b512
Compare
Adds test coverage for struct-encoded UDT literals that contain list and map typed fields to ensure proper roundtrip conversion.
benbellick
commented
Jan 16, 2026
Member
Author
|
I'll be honest and say that I used a lot of agentic coding to figure this one out due to my lack of familiarity with |
asolimando
reviewed
Jan 21, 2026
Contributor
asolimando
left a comment
There was a problem hiding this comment.
LGTM, I guess the important points to clarify are:
- we now throw instead of returning
null, is this expected? - are we guaranteed against "notNull" types showing up with
nullliterals?
In addition, a couple of minor nits, but this looks already good from my perspective.
Feel free to ping me again if you need a second round of review from me!
isthmus/src/main/java/io/substrait/isthmus/expression/CallConverters.java
Outdated
Show resolved
Hide resolved
isthmus/src/main/java/io/substrait/isthmus/expression/CallConverters.java
Outdated
Show resolved
Hide resolved
isthmus/src/main/java/io/substrait/isthmus/expression/CallConverters.java
Outdated
Show resolved
Hide resolved
b6db474 to
ee8c121
Compare
asolimando
approved these changes
Jan 23, 2026
isthmus/src/main/java/io/substrait/isthmus/expression/CallConverters.java
Outdated
Show resolved
Hide resolved
Resolve conflicts in SubstraitRelNodeConverter and SubstraitToCalcite by adopting main's ConverterProvider-based approach. Additional changes: - Update UserDefinedLiteralRoundtripTest to use ConverterProvider API - Fix missing CallConverters.ROW in ConverterProvider.getCallConverters()
vbarua
approved these changes
Feb 26, 2026
Member
vbarua
left a comment
There was a problem hiding this comment.
LGTM. Thanks for working on this.
| * | ||
| * <p>This method is implemented by all concrete Literal classes via Immutables code generation. | ||
| */ | ||
| Literal withNullable(boolean nullable); |
Member
There was a problem hiding this comment.
Oooh, that's handy.
I think we can use this to replace the
which uses a whole visitor just to change the nullability 😅Would be worth quick follow-up after this PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enables the conversion of Substrait:
to Calcite and back
Closes #612