You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Andrey Mashenkov (Jira)" <ji...@apache.org> on 2023/05/03 08:15:00 UTC
[jira] [Updated] (IGNITE-18761) Sql. TypeOf can short-circuit only when its argument is a constant expression.
[ https://issues.apache.org/jira/browse/IGNITE-18761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrey Mashenkov updated IGNITE-18761:
--------------------------------------
Fix Version/s: 3.0.0-beta2
> 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
> Fix For: 3.0.0-beta2
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> 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)