[ https://issues.apache.org/jira/browse/IGNITE-18258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17825647#comment-17825647 ]
Pavel Tupitsyn commented on IGNITE-18258: ----------------------------------------- As discussed with [~mzhuravkov], the problem no longer exists on the SQL engine side. Reassigned to myself to tweak .NET code accordingly and remove TODOs. > Exception on cast to decimal and numeric in SQL > ----------------------------------------------- > > Key: IGNITE-18258 > URL: https://issues.apache.org/jira/browse/IGNITE-18258 > Project: Ignite > Issue Type: Bug > Components: sql > Reporter: Pavel Tupitsyn > Assignee: Pavel Tupitsyn > Priority: Major > Labels: ignite-3 > Fix For: 3.0.0-beta2 > > > *Query* > {code} > select (cast(_T0.KEY as decimal) / ?), cast(_T0.KEY as numeric) from > PUBLIC.TBL_INT32 as _T0 > {code} > *Result* > {code} > org.apache.ignite.lang.IgniteException: IGN-CMN-65535 > TraceId:9b69e26a-0d1e-4891-82bb-f164919a323c For conversion to decimal, > ConverterUtils#convertToDecimal method should be used instead. > at org.apache.ignite.lang.IgniteException.wrap(IgniteException.java:289) > at > org.apache.ignite.internal.sql.engine.AsyncSqlCursorImpl.lambda$requestNextAsync$0(AsyncSqlCursorImpl.java:77) > at > java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:930) > at > java.base/java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:907) > at > java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) > at > java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2088) > at > org.apache.ignite.internal.sql.engine.exec.rel.AsyncRootNode.lambda$closeAsync$0(AsyncRootNode.java:193) > at > java.base/java.util.concurrent.LinkedBlockingQueue.forEachFrom(LinkedBlockingQueue.java:1010) > at > java.base/java.util.concurrent.LinkedBlockingQueue.forEach(LinkedBlockingQueue.java:979) > at > org.apache.ignite.internal.sql.engine.exec.rel.AsyncRootNode.closeAsync(AsyncRootNode.java:193) > at > org.apache.ignite.internal.sql.engine.exec.rel.AsyncRootNode.onError(AsyncRootNode.java:148) > at > org.apache.ignite.internal.sql.engine.exec.ExecutionServiceImpl$DistributedQueryManager.lambda$acknowledgeFragment$1(ExecutionServiceImpl.java:453) > at > java.base/java.util.concurrent.CompletableFuture.uniAcceptNow(CompletableFuture.java:753) > at > java.base/java.util.concurrent.CompletableFuture.uniAcceptStage(CompletableFuture.java:731) > at > java.base/java.util.concurrent.CompletableFuture.thenAccept(CompletableFuture.java:2108) > at > org.apache.ignite.internal.sql.engine.exec.ExecutionServiceImpl$DistributedQueryManager.acknowledgeFragment(ExecutionServiceImpl.java:452) > at > org.apache.ignite.internal.sql.engine.exec.ExecutionServiceImpl.onMessage(ExecutionServiceImpl.java:310) > at > org.apache.ignite.internal.sql.engine.exec.ExecutionServiceImpl.lambda$start$3(ExecutionServiceImpl.java:183) > at > org.apache.ignite.internal.sql.engine.message.MessageServiceImpl.onMessageInternal(MessageServiceImpl.java:164) > at > org.apache.ignite.internal.sql.engine.message.MessageServiceImpl.lambda$onMessage$1(MessageServiceImpl.java:135) > at > org.apache.ignite.internal.sql.engine.exec.QueryTaskExecutorImpl.lambda$execute$0(QueryTaskExecutorImpl.java:80) > at > java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) > at > java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) > at java.base/java.lang.Thread.run(Thread.java:829) > Caused by: java.lang.AssertionError: For conversion to decimal, > ConverterUtils#convertToDecimal method should be used instead. > at > org.apache.ignite.internal.sql.engine.exec.exp.ConverterUtils.convert(ConverterUtils.java:222) > at > org.apache.ignite.internal.sql.engine.exec.exp.ConverterUtils.convert(ConverterUtils.java:201) > at > org.apache.ignite.internal.sql.engine.exec.exp.RexToLixTranslator.visitDynamicParam(RexToLixTranslator.java:1249) > at > org.apache.ignite.internal.sql.engine.exec.exp.RexToLixTranslator.visitDynamicParam(RexToLixTranslator.java:80) > at > org.apache.calcite.rex.RexDynamicParam.accept(RexDynamicParam.java:60) > at > org.apache.ignite.internal.sql.engine.exec.exp.RexToLixTranslator.visitLocalRef(RexToLixTranslator.java:983) > at > org.apache.ignite.internal.sql.engine.exec.exp.RexToLixTranslator.visitLocalRef(RexToLixTranslator.java:80) > at org.apache.calcite.rex.RexLocalRef.accept(RexLocalRef.java:77) > at > org.apache.ignite.internal.sql.engine.exec.exp.RexToLixTranslator.implementCallOperand(RexToLixTranslator.java:1106) > at > org.apache.ignite.internal.sql.engine.exec.exp.RexToLixTranslator.visitCall(RexToLixTranslator.java:1093) > at > org.apache.ignite.internal.sql.engine.exec.exp.RexToLixTranslator.visitCall(RexToLixTranslator.java:80) > at org.apache.calcite.rex.RexCall.accept(RexCall.java:189) > at > org.apache.ignite.internal.sql.engine.exec.exp.RexToLixTranslator.visitLocalRef(RexToLixTranslator.java:983) > at > org.apache.ignite.internal.sql.engine.exec.exp.RexToLixTranslator.visitLocalRef(RexToLixTranslator.java:80) > at org.apache.calcite.rex.RexLocalRef.accept(RexLocalRef.java:77) > at > org.apache.ignite.internal.sql.engine.exec.exp.RexToLixTranslator.translate(RexToLixTranslator.java:197) > at > org.apache.ignite.internal.sql.engine.exec.exp.RexToLixTranslator.translate(RexToLixTranslator.java:191) > at > org.apache.ignite.internal.sql.engine.exec.exp.RexToLixTranslator.translateList(RexToLixTranslator.java:846) > at > org.apache.ignite.internal.sql.engine.exec.exp.RexToLixTranslator.translateProjects(RexToLixTranslator.java:175) > at > org.apache.ignite.internal.sql.engine.exec.exp.ExpressionFactoryImpl.compile(ExpressionFactoryImpl.java:504) > at > org.apache.ignite.internal.sql.engine.exec.exp.ExpressionFactoryImpl.lambda$scalar$1(ExpressionFactoryImpl.java:437) > at > com.github.benmanes.caffeine.cache.BoundedLocalCache.lambda$doComputeIfAbsent$13(BoundedLocalCache.java:2457) > at > java.base/java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1908) > at > com.github.benmanes.caffeine.cache.BoundedLocalCache.doComputeIfAbsent(BoundedLocalCache.java:2455) > at > com.github.benmanes.caffeine.cache.BoundedLocalCache.computeIfAbsent(BoundedLocalCache.java:2438) > at > com.github.benmanes.caffeine.cache.LocalCache.computeIfAbsent(LocalCache.java:107) > at > org.apache.ignite.internal.sql.engine.exec.exp.ExpressionFactoryImpl.scalar(ExpressionFactoryImpl.java:436) > at > org.apache.ignite.internal.sql.engine.exec.exp.ExpressionFactoryImpl.project(ExpressionFactoryImpl.java:254) > at > org.apache.ignite.internal.sql.engine.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:365) > at > org.apache.ignite.internal.sql.engine.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:115) > at > org.apache.ignite.internal.sql.engine.rel.IgniteTableScan.accept(IgniteTableScan.java:137) > at > org.apache.ignite.internal.sql.engine.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:729) > at > org.apache.ignite.internal.sql.engine.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:739) > at > org.apache.ignite.internal.sql.engine.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:428) > at > org.apache.ignite.internal.sql.engine.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:115) > at > org.apache.ignite.internal.sql.engine.rel.IgniteSort.accept(IgniteSort.java:86) > at > org.apache.ignite.internal.sql.engine.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:729) > at > org.apache.ignite.internal.sql.engine.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:739) > at > org.apache.ignite.internal.sql.engine.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:163) > at > org.apache.ignite.internal.sql.engine.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:115) > at > org.apache.ignite.internal.sql.engine.rel.IgniteSender.accept(IgniteSender.java:106) > at > org.apache.ignite.internal.sql.engine.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:729) > at > org.apache.ignite.internal.sql.engine.exec.LogicalRelImplementor.go(LogicalRelImplementor.java:744) > at > org.apache.ignite.internal.sql.engine.exec.ExecutionServiceImpl$DistributedQueryManager.executeFragment(ExecutionServiceImpl.java:482) > at > org.apache.ignite.internal.sql.engine.exec.ExecutionServiceImpl$DistributedQueryManager.submitFragment(ExecutionServiceImpl.java:544) > at > org.apache.ignite.internal.sql.engine.exec.ExecutionServiceImpl.onMessage(ExecutionServiceImpl.java:301) > at > org.apache.ignite.internal.sql.engine.exec.ExecutionServiceImpl.lambda$start$2(ExecutionServiceImpl.java:182) > at > org.apache.ignite.internal.sql.engine.message.MessageServiceImpl.onMessageInternal(MessageServiceImpl.java:164) > at > org.apache.ignite.internal.sql.engine.message.MessageServiceImpl.lambda$onMessage$0(MessageServiceImpl.java:133) > ... 4 more > Suppressed: java.lang.AssertionError: For conversion to decimal, > ConverterUtils#convertToDecimal method should be used instead. > ... 53 more > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)