[ 
https://issues.apache.org/jira/browse/IGNITE-22716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Plekhanov reassigned IGNITE-22716:
------------------------------------------

    Assignee: Aleksey Plekhanov

> Calcite engine. DECODE can't convert INT to DECIMAL
> ---------------------------------------------------
>
>                 Key: IGNITE-22716
>                 URL: https://issues.apache.org/jira/browse/IGNITE-22716
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Aleksey Plekhanov
>            Assignee: Aleksey Plekhanov
>            Priority: Major
>              Labels: ise
>
> Reproducer:
> {noformat}
> sql("select decode(?, 0, 0, 1, 1.0)", 0);{noformat}
> Fails with an exception:
> {noformat}
>  java.lang.AssertionError: For conversion to decimal, 
> ConverterUtils#convertToDecimal method should be used instead.
>     at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.ConverterUtils.convert(ConverterUtils.java:214)
>  ~[classes/:?]
>     at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.ConverterUtils.convert(ConverterUtils.java:178)
>  ~[classes/:?]
>     at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.RexToLixTranslator.implementRecursively(RexToLixTranslator.java:1144)
>  ~[classes/:?]
>     at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.RexToLixTranslator.implementCaseWhen(RexToLixTranslator.java:1076)
>  ~[classes/:?]
>     at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.RexToLixTranslator.visitCall(RexToLixTranslator.java:1018)
>  ~[classes/:?]
>     at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.RexToLixTranslator.visitCall(RexToLixTranslator.java:80)
>  ~[classes/:?]
>     at org.apache.calcite.rex.RexCall.accept(RexCall.java:189) 
> ~[calcite-core-1.34.0.jar:1.34.0]
>     at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.RexToLixTranslator.visitLocalRef(RexToLixTranslator.java:932)
>  ~[classes/:?]
>     at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.RexToLixTranslator.visitLocalRef(RexToLixTranslator.java:80)
>  ~[classes/:?]
>     at org.apache.calcite.rex.RexLocalRef.accept(RexLocalRef.java:77) 
> ~[calcite-core-1.34.0.jar:1.34.0]
>     at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.RexToLixTranslator.translate(RexToLixTranslator.java:206)
>  ~[classes/:?]
>     at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.RexToLixTranslator.translate(RexToLixTranslator.java:199)
>  ~[classes/:?]
>     at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.RexToLixTranslator.translateList(RexToLixTranslator.java:809)
>  ~[classes/:?]
>     at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.RexToLixTranslator.translateProjects(RexToLixTranslator.java:180)
>  ~[classes/:?]
>     at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFactoryImpl.compile(ExpressionFactoryImpl.java:516)
>  ~[classes/:?]{noformat}



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

Reply via email to