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(core): infer the source column from the manifest #844

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

goldmedal
Copy link
Contributor

@goldmedal goldmedal commented Oct 23, 2024

Description

Try to infer the metadata of the source table from the manifest if the register tables aren't provided.
There are some rules to infer the columns of the source table:

  • If the column is calculated or has a relationship, it's not a source column.
  • If the column is without expression, it's a source column.
  • If the column has an expression, it will try to infer the source column from the expression.
  • If the expression is a simple column reference(identifier or compound identifier), it's the source column name.
  • If the expression is complex, it can't be inferred.

The source columns will be registered with the source table name in the session context.

@github-actions github-actions bot added core rust Pull requests that update Rust code labels Oct 23, 2024
@goldmedal goldmedal marked this pull request as ready for review October 23, 2024 09:05
@goldmedal goldmedal requested a review from grieve54706 October 23, 2024 09:06
Copy link
Contributor

@grieve54706 grieve54706 left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @goldmedal.

@grieve54706 grieve54706 merged commit f9e4e02 into Canner:main Oct 23, 2024
15 checks passed
@goldmedal goldmedal deleted the feature/infer-source-column branch October 24, 2024 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants