fix: set VirtualTableScan schema explicitly #272
Merged
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.
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