Maksim Zhuravkov created IGNITE-18761:
-----------------------------------------
Summary: Sql. TypeOf can short-circuit only its argument is a
constant expression.
Key: IGNITE-18761
URL: https://issues.apache.org/jira/browse/IGNITE-18761
Project: Ignite
Issue Type: Bug
Components: sql
Affects Versions: 3.0.0-beta2
Reporter: Maksim Zhuravkov
The current implement of typeof simply check the type its operand but this is
not correct because the operand maybe an invalid expression or a function that
produces a side effect.
MRE:
{code:java}
assertThrows(RuntimeException.class, () -> assertQuery("SELECT
TYPEOF(CAST('NOT_A_NUMBER' AS INTEGER))").check());
{code}
This query should return an error but it returns a string INTEGER.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)