-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[CALCITE-7599] Enhance parser to allow numeric literals as values in k/v hints as suggested by documentation #5012
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9693,7 +9693,12 @@ private static Consumer<List<? extends Throwable>> checkWarnings( | |
| final String sql1 = "select " | ||
| + "/*+ properties(^k1^=123, k2='v2'), no_hash_join() */ " | ||
| + "empno, ename, deptno from emps"; | ||
| sql(sql1).fails("(?s).*Encountered \"k1 = 123\" at .*"); | ||
| // Allow numeric literal k/v values. | ||
| final String expected1 = "SELECT\n" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you want to add a few more tests with the more complex numeric literals supported, e.g.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That would make sense, but I'll add them to |
||
| + "/*+ `PROPERTIES`(`K1` = 123, `K2` = 'v2'), `NO_HASH_JOIN` */\n" | ||
| + "`EMPNO`, `ENAME`, `DEPTNO`\n" | ||
| + "FROM `EMPS`"; | ||
| sql(sql1).ok(expected1); | ||
| final String sql2 = "select " | ||
| + "/*+ properties(k1, k2^=^'v2'), no_hash_join */ " | ||
| + "empno, ename, deptno from emps"; | ||
|
|
||
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.
why remove the static?
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.
So that we can reference
optionsin therequireNonNullmessage.