Skip to content

Conversation

@gord02
Copy link
Contributor

@gord02 gord02 commented Dec 1, 2025

This PR is to add support for the Expression Nested List type.

Issue

Key Changes:

  • Substrait pojo to proto and back conversion
  • Substrait pojo to calcite and back conversion
  • Added new type in Isthmus to support Nested functions list during the conversion to Calcite from Substrait
  • Added code to not do a project remapping on an empty table

Testing:

  • added tests for roundtrip between substrait to proto
  • added tests for roundtrip between substrait and calcite

./gradlew test --tests io.substrait.isthmus.NestedExpressionsTest --debug-jvm

@gord02 gord02 force-pushed the gordon.hamilton/expressionNestedTypes branch from 18967e4 to 9e99091 Compare December 2, 2025 15:50
Copy link
Member

@benbellick benbellick left a comment

Choose a reason for hiding this comment

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

Left a few comments. Thanks!

@benbellick benbellick self-requested a review December 2, 2025 20:42
Copy link
Member

@benbellick benbellick left a comment

Choose a reason for hiding this comment

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

Just left a few more comments but the core/ part is looking great!

Copy link
Member

@benbellick benbellick left a comment

Choose a reason for hiding this comment

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

I think the core stuff looks great! I will try and take a pass at the isthmus stuff, but as I mentioned to you online, I am not as comfortable with that part of the codebase. If the changes there seem simple enough that I am comfortable approving, I will do so. Otherwise, I'll leave it to @vbarua or others to make the final judgement call 🙂

new SqlFunction(
"nested_list",
SqlKind.OTHER_FUNCTION,
ReturnTypes.BOOLEAN,
Copy link
Member

Choose a reason for hiding this comment

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

So again, I don't really know the calcite stuff that well, but at the very least this seems unusual. What do nested list types have to do with SqlFunction? And why would the return type be BOOLEAN?

Perhaps this is some kind of workaround to get around an inherent limitation of calcite / isthmus. But if that is the case, then there should be some thorough paragraph somewhere explaining why this would be necessary.

@vbarua vbarua changed the title Add support for Expression nested List Type feat: support Nested Lists Dec 3, 2025
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.

2 participants