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): apply the DataFusion optimization rule #819

Merged
merged 8 commits into from
Oct 11, 2024

Conversation

goldmedal
Copy link
Contributor

@goldmedal goldmedal commented Oct 8, 2024

Description

  • Apply the DataFusion Optimization rule for a better SQL.
  • Now, the Wren Analzye Rule can be registered to SessionContext and executed by DataFusion directly.
  • Run the sqllogictests with DataFusion directly.
  • Modify the building profile. Build release profile only in stable-release flow.

Known Issue

  • After applying the rules, the calculated field and wren view are broken. I'll address them in another PR.

@@ -71,7 +71,8 @@ mod tests {
.unwrap();
assert_eq!(
transformed_sql,
r#"SELECT * FROM (SELECT main.customer.c_custkey AS c_custkey, main.customer.c_name AS c_name FROM main.customer) AS customer"#
"SELECT main.customer.c_custkey AS c_custkey, main.customer.c_name AS c_name FROM \
Copy link
Contributor Author

Choose a reason for hiding this comment

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

After applying ExpandWildcardRule, the select items are expanded. We will apply the type of coercion rules for them in the future.

@goldmedal goldmedal marked this pull request as ready for review October 11, 2024 08:10
@goldmedal goldmedal requested a review from grieve54706 October 11, 2024 08:10
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 3cb4da9 into Canner:main Oct 11, 2024
15 checks passed
@goldmedal goldmedal deleted the feature/datafusion-opt-rule branch October 11, 2024 09:43
grieve54706 pushed a commit that referenced this pull request Dec 13, 2024
* recompute all node after model generate

* apply optimization rule

* run sqllogictests with datafusion direclty

* enable tpch q20

* fix test and disable calcaulte and view test

* fix test

* build release profile only in stable-release

* fix ibis ci
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