Skip to content

Conversation

@gord02
Copy link
Contributor

@gord02 gord02 commented Jan 20, 2026

This PR removes the EmptyScan and replaces it with empty VirtualTableScan.

Closes #673

@github-actions
Copy link

ACTION NEEDED

Substrait follows the Conventional Commits
specification
for
release automation.

The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification.

@gord02 gord02 force-pushed the gordon.hamilton/removeEmptyScan branch from a66fe19 to 0c267da Compare January 20, 2026 15:54
@gord02 gord02 changed the title removing emptyScan in favor of emptyVirtualTableScan feat: removing emptyScan in favor of emptyVirtualTableScan Jan 20, 2026
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.

all looks reasonable to me! Only thing really is just putting that roundtrip test back in.

Also, maybe we will want to mark this as a breaking change since we are technically modifying the API here by dropping a public class. @vbarua

Comment on lines +318 to 322
public VirtualTableScan emptyVirtualTableScan() {
return VirtualTableScan.builder()
.initialSchema(NamedStruct.of(Collections.emptyList(), R.struct()))
.build();
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
public VirtualTableScan emptyVirtualTableScan() {
return VirtualTableScan.builder()
.initialSchema(NamedStruct.of(Collections.emptyList(), R.struct()))
.build();
}

I'm almost inclined to just delete this entirely now. Is this also schemaless?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah I think that if removing it isn't such a large diff, then I am in support of getting rid of it. If it ends up being a bit of a pain though, we can save it for later.

Copy link
Member

Choose a reason for hiding this comment

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

Okay I see now its used in a bunch of tests, so no worries about keeping it for now.

void emptyScan() {
io.substrait.relation.EmptyScan emptyScan = sb.emptyScan();
verifyRoundTrip(emptyScan);
}
Copy link
Member

Choose a reason for hiding this comment

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

I think we might as well just keep this test but make it a roundtrip test on the empty virtual table.

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.

Drop EmptyScan in favor of allowing empty VirtualTableScan

2 participants