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

refactor(substrait): refactor ReadRel consumer #12983

Merged
merged 1 commit into from
Oct 18, 2024

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

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
24 checks passed
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants