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

feat: check that VirtualTableScan field names correspond to schema #284

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

vbarua
Copy link
Member

@vbarua vbarua commented Jul 18, 2024

No description provided.

@vbarua vbarua force-pushed the vbarua/improve-virtual-table-scan-validation branch 2 times, most recently from 65374d9 to 505afaa Compare July 18, 2024 22:12
@vbarua vbarua force-pushed the vbarua/improve-virtual-table-scan-validation branch from 505afaa to 8bc5997 Compare July 18, 2024 22:20
R.list(R.STRING),
R.map(R.STRING, R.STRING))))
R.list(R.struct(R.STRING)),
R.map(R.struct(R.STRING), R.struct(R.STRING)))))
Copy link
Member Author

Choose a reason for hiding this comment

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

The types here did not match the actual row types, which led to some confusion.

@@ -24,13 +24,16 @@ public abstract class VirtualTableScan extends AbstractReadRel {
@Value.Check
protected void check() {
var names = getInitialSchema().names();

assert names.size()
== NamedFieldCountingTypeVisitor.countNames(this.getInitialSchema().struct());
Copy link
Member Author

Choose a reason for hiding this comment

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

It may make more sense to move this check into the NamedStruct itself in the long-term. Avoiding this for now because there's some stuff I'd like to verify around names going to and from Calcite and Substrait.

@vbarua vbarua merged commit 0f8514a into main Jul 18, 2024
12 checks passed
@vbarua vbarua deleted the vbarua/improve-virtual-table-scan-validation branch July 18, 2024 23:34
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