Skip to content

add support for nested types #160

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

Merged
merged 5 commits into from
May 3, 2025
Merged

Conversation

achille-roussel
Copy link
Contributor

This PR adds missing support for nested types.

I ran make format, hence some of the formatting changes.

Signed-off-by: Achille Roussel <achille.roussel@gmail.com>
@CLAassistant
Copy link

CLAassistant commented May 1, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@EpsilonPrime EpsilonPrime left a comment

Choose a reason for hiding this comment

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

Thanks for adding this additional support!

PRAGMA enable_verification

statement ok
CREATE TABLE nested_test (
Copy link
Member

Choose a reason for hiding this comment

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

I'd like to see additional nesting (a struct, list, or map within one of the others).

@@ -0,0 +1,46 @@
# name: test/sql/test_substrait_nested_types.test
# description: Test nested type support in substrait extension (LIST, MAP, ARRAY)
Copy link
Member

Choose a reason for hiding this comment

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

What's the difference between a list and an array? Is STRUCT supposed to be listed here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah sorry, leftover... I tried to implement the ARRAY type (fixed-length list basically), and reverted it because I didn't have a clear use case for it, and it was harder to test due to Substrait not having fixed-length arrays.

I'll remove ARRAY from the comment here.

Signed-off-by: Achille Roussel <achille.roussel@gmail.com>
Signed-off-by: Achille Roussel <achille.roussel@gmail.com>
Signed-off-by: Achille Roussel <achille.roussel@gmail.com>
@achille-roussel
Copy link
Contributor Author

I went ahead and addressed the requested changes and added more tests, let me know if anything else needs to be changed!

@EpsilonPrime EpsilonPrime merged commit ae71f52 into substrait-io:main May 3, 2025
27 checks passed
@achille-roussel
Copy link
Contributor Author

Thanks for the quick turn around and feedback!

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.

3 participants