Skip to content
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

fix: set VirtualTableScan schema explicitly #272

Merged

Conversation

Blizzara
Copy link
Contributor

VirtualTableScan in Substrait is expected to contain both a NamedSchema (field names in dfs form and types) like any other read rel, plus the actual data rows. However substrait-java was ignoring the types of the NamedSchema, instead grabbing type info from the first row of the data. This however is not always sufficient since the data can contain varying nullability row-by-row.

This also just simplifies VirtualTableScan and makes it behave more like one would expect by looking at the Substrait spec as well as other ReadRels

VirtualTableScan in Substrait is expected to contain both a NamedSchema
(field names in dfs form and types) like any other read rel, plus the
actual data rows. However substrait-java was ignoring the types of the
NamedSchema, instead grabbing type info from the first row of the data.
This however is not always sufficient since the data can contain varying
nullability row-by-row.

This also just simplifies VirtualTableScan and makes it behave more like
one would expect by looking at the Substrait spec as well as other ReadRels
@Blizzara Blizzara force-pushed the avo/virtual-table-scan-maintain-schema branch from 1ffc74f to d997326 Compare June 19, 2024 16:49
Copy link
Member

@vbarua vbarua left a comment

Choose a reason for hiding this comment

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

I like this change. Thanks for proposing it! The build is failing, but if you fix that I'm happy to approve and merge this.

@Blizzara Blizzara force-pushed the avo/virtual-table-scan-maintain-schema branch from 98ca9ad to 14b7a1b Compare June 20, 2024 16:39
@vbarua vbarua changed the title fix: maintain defined schema in VirtualTableScan fix: set VirtualTableScan schema explicitly Jun 20, 2024
@vbarua vbarua merged commit f1192cf into substrait-io:main Jun 20, 2024
12 checks passed
@Blizzara Blizzara deleted the avo/virtual-table-scan-maintain-schema branch June 20, 2024 18:04
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