[ 
https://issues.apache.org/jira/browse/IGNITE-23673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17899806#comment-17899806
 ] 

Ignite TC Bot commented on IGNITE-23673:
----------------------------------------

{panel:title=Branch: [pull/11659/head] Base: [master] : No blockers 
found!|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}{panel}
{panel:title=Branch: [pull/11659/head] Base: [master] : New Tests 
(2)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}
{color:#00008b}Calcite SQL{color} [[tests 
2|https://ci2.ignite.apache.org/viewLog.html?buildId=8165831]]
* {color:#013220}IgniteCalciteTestSuite: FunctionsTest.testDecode - 
PASSED{color}
* {color:#013220}IgniteCalciteTestSuite: FunctionsTest.testNvl - PASSED{color}

{panel}
[TeamCity *--> Run :: All* 
Results|https://ci2.ignite.apache.org/viewLog.html?buildId=8164653&buildTypeId=IgniteTests24Java8_RunAll]

> Calcite engine. Functions NVL and DECODE fail when used with parameters of 
> different data types 
> ------------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-23673
>                 URL: https://issues.apache.org/jira/browse/IGNITE-23673
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Aleksey Plekhanov
>            Assignee: Aleksey Plekhanov
>            Priority: Major
>              Labels: calcite, ise
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> For example, query:
> {code:java}
> select nvl('1', 2)
> {code}
> Fails with:
> {noformat}
> Cannot infer return type for NVL; operand types: [VARCHAR, INTEGER]
> {noformat}
> Query:
> {code:java}
> select decode('1', 1, '1', '2')
> {code}
> Fails with:
> {noformat}
> org.apache.ignite.IgniteCheckedException: while resolving method 'eq[class 
> java.lang.String, int]' in class class org.apache.calcite.runtime.SqlFunctions
> {noformat}
> These functions are rewritten to the {{CASE-WHEN}} operator after the 
> validation, but fail on validation. But if we use {{CASE-WHEN}} in the 
> original query, it works well, types are casted correctly and validation 
> passed:
> {code:java}
> select case when '1' is not null then '1' else 2 end
> select case when '1' = 1 then '1' else '2' end
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to