-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[CALCITE-6693] Add Source SQL Dialect to RelToSqlConverterTest #4050
base: main
Are you sure you want to change the base?
[CALCITE-6693] Add Source SQL Dialect to RelToSqlConverterTest #4050
Conversation
Please fix CLI |
db271e5
to
2002efa
Compare
Quality Gate passedIssues Measures |
Thanks for the reminder, it's fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am approving this, let's see if anyone has any other comments.
@@ -559,7 +562,7 @@ private static String toSql(RelNode root, SqlDialect dialect, | |||
+ "FROM `foodmart`.`product`\n" | |||
+ "GROUP BY `product_class_id`, `product_id` WITH CUBE"; | |||
sql(query).withHive().ok(expected); | |||
SqlDialect sqlDialect = sql(query).withHive().dialect; | |||
SqlDialect sqlDialect = sql(query).withHive().targetDialect; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a very useful change, the naming is indeed confusing.
-1 let's discuss in jira |
removed label until the discussion in JIRA is settled. |
What changes were proposed in this pull request?
Add Source SQL Dialect to RelToSqlConverterTest to make dialect translation more clear.
Why are the changes needed?
Currently, RelToSqlConverterTest converts the original SQL to RelNode using the default validator config and the target dialect's type system, which is confusing. We should ensure the conversion conforms to the source dialect's specifications, and then convert from the source dialect's RelNode to the target dialect's SQL.
Does this PR introduce any user-facing change?
Yes, the null collation the PlannerImpl use will be validator config's null collation when calcite connection property unset.