Skip to content

Conversation

@tokoko
Copy link
Contributor

@tokoko tokoko commented Oct 17, 2024

Rationale for this change

some minor refactoring after #12800 as promised.

Are these changes tested?

existing tests

Are there any user-facing changes?

no

@github-actions github-actions bot added the substrait Changes to the substrait crate label Oct 17, 2024
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Looks like an improvement to me -- thank you @tokoko

Copy link
Contributor

@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.

One minor comment, but overall this looks good to me. Thanks for following up with the 🧹

Ok(LogicalPlan::Values(Values {
schema: DFSchemaRef::new(substrait_schema),
values,
}))
Copy link
Contributor

Choose a reason for hiding this comment

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

minor/non-blocking: strictly speaking, we should call read_with_schema here as well because it's valid to define a projection for a VirtualTable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a good point, but I think the implementation will have to be different. NamedTable and LocalFiles translate to TableScan operator which has a projections field that is used by read_with_schema function. VirtualTable translates to Values operator instead that doesn't have a projections field, we will have to apply a Project on top. I'll open a ticket to track this.

@alamb alamb merged commit 97f7491 into apache:main Oct 18, 2024
@alamb
Copy link
Contributor

alamb commented Oct 18, 2024

🚀

@tokoko tokoko deleted the refactor-read-rel branch October 18, 2024 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

substrait Changes to the substrait crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants