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

Aleksey Plekhanov updated IGNITE-16711:
---------------------------------------
    Fix Version/s: 2.13

> Fail to convert DECIMAL dynamic parameter
> -----------------------------------------
>
>                 Key: IGNITE-16711
>                 URL: https://issues.apache.org/jira/browse/IGNITE-16711
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>            Reporter: Taras Ledkov
>            Assignee: Aleksey Plekhanov
>            Priority: Major
>              Labels: calcite2-required, calcite3-required
>             Fix For: 2.13
>
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> Steps to reproduce:
> {code}
> sql("create table my_table (id int primary key, val DECIMAL)");
> sql("insert into  my_table values (?, ?)", 0, BigDecimal.valueOf(0));
> {code}
> Error:
> {code}
> 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:213)
>       at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.ConverterUtils.convert(ConverterUtils.java:177)
>       at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.RexToLixTranslator.visitDynamicParam(RexToLixTranslator.java:1191)
>       at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.RexToLixTranslator.visitDynamicParam(RexToLixTranslator.java:81)
>       at 
> org.apache.calcite.rex.RexDynamicParam.accept(RexDynamicParam.java:60)
>       at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.RexToLixTranslator.visitLocalRef(RexToLixTranslator.java:936)
>       at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.RexToLixTranslator.visitLocalRef(RexToLixTranslator.java:81)
>       at org.apache.calcite.rex.RexLocalRef.accept(RexLocalRef.java:77)
>       at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.RexToLixTranslator.translate(RexToLixTranslator.java:207)
>       at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.RexToLixTranslator.translate(RexToLixTranslator.java:200)
>       at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.RexToLixTranslator.translateList(RexToLixTranslator.java:813)
>       at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.RexToLixTranslator.translateProjects(RexToLixTranslator.java:181)
>       at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFactoryImpl.compile(ExpressionFactoryImpl.java:353)
>       at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFactoryImpl.lambda$scalar$3(ExpressionFactoryImpl.java:286)
>       at 
> java.base/java.util.concurrent.ConcurrentMap.computeIfAbsent(ConcurrentMap.java:330)
>       at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFactoryImpl.scalar(ExpressionFactoryImpl.java:285)
>       at 
> org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFactoryImpl.project(ExpressionFactoryImpl.java:224)
>       at 
> org.apache.ignite.internal.processors.query.calcite.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:206)
>       at 
> org.apache.ignite.internal.processors.query.calcite.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:113)
>       at 
> org.apache.ignite.internal.processors.query.calcite.rel.IgniteProject.accept(IgniteProject.java:89)
>       at 
> org.apache.ignite.internal.processors.query.calcite.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:758)
>       at 
> org.apache.ignite.internal.processors.query.calcite.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:768)
>       at 
> org.apache.ignite.internal.processors.query.calcite.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:580)
>       at 
> org.apache.ignite.internal.processors.query.calcite.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:113)
>       at 
> org.apache.ignite.internal.processors.query.calcite.rel.IgniteTableModify.accept(IgniteTableModify.java:97)
>       at 
> org.apache.ignite.internal.processors.query.calcite.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:758)
>       at 
> org.apache.ignite.internal.processors.query.calcite.exec.LogicalRelImplementor.go(LogicalRelImplementor.java:773)
>       at 
> org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.mapAndExecutePlan(ExecutionServiceImpl.java:547)
>       at 
> org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.executePlan(ExecutionServiceImpl.java:438)
>       at 
> org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.query(CalciteQueryProcessor.java:393)
>       at 
> org.apache.ignite.internal.processors.query.calcite.integration.AbstractBasicIntegrationTest.sql(AbstractBasicIntegrationTest.java:175)
>       at 
> org.apache.ignite.internal.processors.query.calcite.integration.AbstractBasicIntegrationTest.sql(AbstractBasicIntegrationTest.java:170)
>       at 
> org.apache.ignite.internal.processors.query.calcite.integration.TableDdlIntegrationTest.dbg(TableDdlIntegrationTest.java:63)
>       at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>       at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>       at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>       at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>       at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>       at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>       at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
>       at 
> org.apache.ignite.testframework.junits.GridAbstractTest$7.run(GridAbstractTest.java:2432)
>       at java.base/java.lang.Thread.run(Thread.java:834)
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to