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

Introduce the calculation for TO_MANY relationship #626

Merged
merged 14 commits into from
Jun 24, 2024

Conversation

goldmedal
Copy link
Contributor

@goldmedal goldmedal commented Jun 21, 2024

Description

  • Upgrade Datafusion to v39.0.0
  • Introduce the TO_MANAY calculation
  • Enhance the error handling: stop to panic and throw DataFusionError instead.
  • Fix and enhance the testing

Known issue

  • The generated logical plan can't apply to DataFusion directly. Currently, I use a workaround to run the SQL by DataFusion.
    • Generated the SQL by WrenMDL#transform_sql
    • Execute the generated SQL by DataFusion.

@goldmedal goldmedal marked this pull request as ready for review June 21, 2024 13:47
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

Comment on lines -412 to +446
r#"SELECT "a"."c1", "a"."c2" FROM "default"."a""#),
r#"SELECT a.c1, a.c2 FROM wrenai."default".a"#),
("select wrenai.default.a.c1, wrenai.default.a.c2 from wrenai.default.a where wrenai.default.a.c1 = 1",
r#"SELECT "a"."c1", "a"."c2" FROM "default"."a" WHERE ("a"."c1" = 1)"#),
r#"SELECT a.c1, a.c2 FROM wrenai."default".a WHERE (a.c1 = 1)"#),
("select wrenai.default.a.c1 + 1 from wrenai.default.a",
r#"SELECT ("a"."c1" + 1) FROM "default"."a""#)
r#"SELECT (a.c1 + 1) FROM wrenai."default".a"#)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we remove all double quotes?

Copy link
Contributor Author

@goldmedal goldmedal Jun 24, 2024

Choose a reason for hiding this comment

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

In DataFusion v39.0.0, only quote a identifier if it's a keyword.
apache/datafusion#10573

@grieve54706 grieve54706 merged commit 8431723 into Canner:main Jun 24, 2024
9 checks passed
@goldmedal
Copy link
Contributor Author

Thanks @grieve54706

@goldmedal goldmedal deleted the feature/intro-to-many-calculation branch June 24, 2024 06:52
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.

2 participants