Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
1.8.0
-
None
-
None
Description
hi calcite experts
when I run an auto-generated query(by BI tools):
select "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME", sum("TEST_KYLIN_FACT"."PRICE") from "DEFAULT"."TEST_KYLIN_FACT" "TEST_KYLIN_FACT" group by "TEST_KYLIN_FACT"."LSTG_FORMAT_NAME" having NOT sum("TEST_KYLIN_FACT"."PRICE") is null
the query failed due to : " Cannot apply 'NOT' to arguments of type 'NOT<DECIMAL(19, 4)>'. Supported form(s): 'NOT<BOOLEAN>'"
however the same query would succeed in mysql. I guess calcite is giving "NOT" operation higher precedence than "IS NULL" operator.
Then I googled and found this page: https://docs.oracle.com/cd/A57673_01/DOC/server/doc/SQL73/ch3a.htm, it's oracle's standard, I'm quoting for as a reference. In this page, it says "All comparison operators" has a higher precedence than "NOT","AND","OR", and "IS [NOT] NULL" is one of the comparison operators.
With all the clues above I'm believing it's a calcite's bug. Please correct me if I'm wrong.
Attachments
Issue Links
- duplicates
-
CALCITE-1095 NOT precedence
- Closed