Steve Carlin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/25137 )

Change subject: IMPALA-14947: Calcite planner: fix parsing issues
......................................................................


Patch Set 6:

(7 comments)

http://gerrit.cloudera.org:8080/#/c/25137/5/java/calcite-planner/src/main/codegen/config.fmpp
File java/calcite-planner/src/main/codegen/config.fmpp:

http://gerrit.cloudera.org:8080/#/c/25137/5/java/calcite-planner/src/main/codegen/config.fmpp@56
PS5, Line 56:     "AVG"
> I am unclear why AVG and RANK are listed in the nonReservedKeyWords.  What'
So I hit this in some e2e tests.  There was an alias defined "as rank" and "as 
avg" that caused failure until I added it to this list.

There probably are other failures?  But just not in the e2e tests?

I can either a) add new e2e tests covering other words, or b) file a jira 
describing that some aliases may not work.

a) of course, is prolly the better choice, but admittedly, I just got a little 
lazy and wanted the e2e tests to work.  I can add new ones if you feel 
necessary, or I can continue to go with the lazy option and just file a jira?

Which do you think I should do?


http://gerrit.cloudera.org:8080/#/c/25137/5/java/calcite-planner/src/main/codegen/config.fmpp@470
PS5, Line 470:     "< BITAND_OPERATOR: \"&\" >"
> In addition, how about bitwise OR  i.e '|' , and logical OR i.e '||' ? Corr
I'll have to investigate further on this.

This was enough to get the e2e tets going.  I do know that the OR operator and 
|| operators work.  Maybe Calcite built these in and didn't need the special 
override here?  If you look at the Parser.jj additions, you'll see that these 3 
were also added within that file, so the others may just be covered by normal 
Calcite logic.  I'll try to get a better answer tomorrow.


http://gerrit.cloudera.org:8080/#/c/25137/5/java/calcite-planner/src/main/java/org/apache/impala/calcite/operators/ImpalaConvertletTable.java
File 
java/calcite-planner/src/main/java/org/apache/impala/calcite/operators/ImpalaConvertletTable.java:

http://gerrit.cloudera.org:8080/#/c/25137/5/java/calcite-planner/src/main/java/org/apache/impala/calcite/operators/ImpalaConvertletTable.java@144
PS5, Line 144:     if (call.operandCount() == 3)
> This checks for operand count > 2 which could mean any number greater than
Done


http://gerrit.cloudera.org:8080/#/c/25137/5/java/calcite-planner/src/main/java/org/apache/impala/calcite/operators/ImpalaCustomOperatorTable.java
File 
java/calcite-planner/src/main/java/org/apache/impala/calcite/operators/ImpalaCustomOperatorTable.java:

http://gerrit.cloudera.org:8080/#/c/25137/5/java/calcite-planner/src/main/java/org/apache/impala/calcite/operators/ImpalaCustomOperatorTable.java@192
PS5, Line 192:   public static final SqlPostfixOperator FACTORIAL =
> This comment seems wrongly placed .. it is about the MINUS operator whereas
Done


http://gerrit.cloudera.org:8080/#/c/25137/5/java/calcite-planner/src/main/java/org/apache/impala/calcite/type/ImpalaTypeSystemImpl.java
File 
java/calcite-planner/src/main/java/org/apache/impala/calcite/type/ImpalaTypeSystemImpl.java:

http://gerrit.cloudera.org:8080/#/c/25137/5/java/calcite-planner/src/main/java/org/apache/impala/calcite/type/ImpalaTypeSystemImpl.java@231
PS5, Line 231: e also return null when we use the INT_DI
> It is not clear why nullability of a result of an arithmetic expr would dep
Added comment to explain why this is needed.


http://gerrit.cloudera.org:8080/#/c/25137/5/testdata/workloads/functional-query/queries/QueryTest/fallback_planner.test
File 
testdata/workloads/functional-query/queries/QueryTest/fallback_planner.test:

http://gerrit.cloudera.org:8080/#/c/25137/5/testdata/workloads/functional-query/queries/QueryTest/fallback_planner.test@83
PS5, Line 83: # Test for ignore nulls within parens syntax
            : select id, tinyint_col,
> The mention of 'Calcite currently expects ..'  seems confusing since you ha
Done


http://gerrit.cloudera.org:8080/#/c/25137/5/testdata/workloads/functional-query/queries/QueryTest/fallback_planner.test@95
PS5, Line 95: select id, tinyint_col,
            :   last_value(tinyint_col ignore nulls) over
> Sane as above.
Done



--
To view, visit http://gerrit.cloudera.org:8080/25137
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5e275f1b0b1f4895a12ac6251e91a39408815a75
Gerrit-Change-Number: 25137
Gerrit-PatchSet: 6
Gerrit-Owner: Steve Carlin <[email protected]>
Gerrit-Reviewer: Aleksandr Efimov <[email protected]>
Gerrit-Reviewer: Aman Sinha <[email protected]>
Gerrit-Reviewer: Fang-Yu Rao <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Steve Carlin <[email protected]>
Gerrit-Comment-Date: Mon, 26 Oct 2026 02:50:29 +0000
Gerrit-HasComments: Yes

Reply via email to