Details
-
Bug
-
Resolution: Fixed
-
Major
-
6.0.0
-
Untriaged
-
Unknown
-
CX Sprint 138
Description
Compiler error when WHERE clause contains a non-function expression
1. create dataset test on WHATEVER
2. create index idx_x on test(x:BIGINT)
3. Explain plan or run the following query:
explain text
|
from test t
|
where t.x >= str_to_millis("2001-01-01") and t.x < str_to_millis("2001-11-11")
|
select value t
|
t.x is indexed, t.x is used twice, the predicate contains non-functional expression that is not constant folded.
Error:
[
|
{
|
"code": 24001,
|
"msg": "Compilation error: Could not infer type for variable '$$21'.",
|
"query_from_user": "explain text\nfrom test t\nwhere t.x >= str_to_millis(\"2001-01-01\") and t.x < str_to_millis(\"2001-11-11\")\nselect value t"
|
}
|
]
|