You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Aleksey Plekhanov (Jira)" <ji...@apache.org> on 2022/04/01 10:56:00 UTC

[jira] [Commented] (IGNITE-16711) Fail to convert DECIMAL dynamic parameter

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

Aleksey Plekhanov commented on IGNITE-16711:
--------------------------------------------

[~zstan], [~korlov], [~tledkov-gridgain], [~ivandasch], can you please review the patch?

> 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
>          Time Spent: 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)