[
https://issues.apache.org/jira/browse/IGNITE-18761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Maksim Zhuravkov reassigned IGNITE-18761:
-----------------------------------------
Assignee: Maksim Zhuravkov
> Sql. TypeOf can short-circuit only when 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
> Assignee: Maksim Zhuravkov
> Priority: Major
> Labels: calcite2-required, calcite3-required, ignite-3
>
> The current implement of typeof simply checks 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)