You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Maksim Zhuravkov (Jira)" <ji...@apache.org> on 2024/12/11 11:00:00 UTC
[jira] [Created] (IGNITE-23949) Sql. Disable unsupported ASOF join
Maksim Zhuravkov created IGNITE-23949:
-----------------------------------------
Summary: Sql. Disable unsupported ASOF join
Key: IGNITE-23949
URL: https://issues.apache.org/jira/browse/IGNITE-23949
Project: Ignite
Issue Type: Improvement
Components: sql
Reporter: Maksim Zhuravkov
There is implementation of ASOF join in Apache Ignite 3 and the validator should reject such query with a error message that says that.
Instead of that we get "This method should not be called" error.
{noformat}
SELECT *
FROM (VALUES (NULL, 0), (1, NULL), (1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (2, 3), (3, 4)) AS t1(k, t)
ASOF JOIN (VALUES (1, NULL), (1, 2), (1, 3), (2, 10), (2, 0)) AS t2(k, t)
MATCH_CONDITION t2.t < t1.t
ON t1.k = t2.k
{noformat}
Stacktrace:
{noformat}
2024-12-11 12:55:23:818 +0200 [INFO][%node1%sql-planning-pool-1][JdbcQueryEventHandlerImpl] Exception while executing query [query=SELECT *
FROM (VALUES (NULL, 0), (1, NULL), (1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (2, 3), (3, 4)) AS t1(k, t)
ASOF JOIN (VALUES (1, NULL), (1, 2), (1, 3), (2, 10), (2, 0)) AS t2(k, t)
MATCH_CONDITION t2.t < t1.t
ON t1.k = t2.k;]
org.apache.ignite.sql.SqlException: IGN-CMN-65535 TraceId:36693169-3aa2-4632-a915-566b670c7d53 This method should not be called
at org.apache.ignite.internal.lang.SqlExceptionMapperUtil.mapToPublicSqlException(SqlExceptionMapperUtil.java:73)
at org.apache.ignite.internal.sql.engine.prepare.PrepareServiceImpl.lambda$prepareAsync$0(PrepareServiceImpl.java:253)
at java.base/java.util.concurrent.CompletableFuture.uniExceptionally(CompletableFuture.java:986)
at java.base/java.util.concurrent.CompletableFuture$UniExceptionally.tryFire(CompletableFuture.java:970)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1705)
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: org.apache.ignite.lang.IgniteException: IGN-CMN-65535 TraceId:36693169-3aa2-4632-a915-566b670c7d53 This method should not be called
at org.apache.ignite.internal.lang.IgniteExceptionMapperUtil.lambda$mapToPublicException$2(IgniteExceptionMapperUtil.java:88)
at org.apache.ignite.internal.lang.IgniteExceptionMapperUtil.mapCheckingResultIsPublic(IgniteExceptionMapperUtil.java:141)
at org.apache.ignite.internal.lang.IgniteExceptionMapperUtil.mapToPublicException(IgniteExceptionMapperUtil.java:137)
at org.apache.ignite.internal.lang.IgniteExceptionMapperUtil.mapToPublicException(IgniteExceptionMapperUtil.java:88)
at org.apache.ignite.internal.lang.SqlExceptionMapperUtil.mapToPublicSqlException(SqlExceptionMapperUtil.java:63)
... 8 more
Caused by: java.lang.RuntimeException: This method should not be called
at org.apache.calcite.rel.logical.LogicalAsofJoin.copy(LogicalAsofJoin.java:145)
at org.apache.ignite.internal.sql.engine.rule.logical.IgniteJoinConditionPushRule.onMatch(IgniteJoinConditionPushRule.java:46)
at org.apache.calcite.plan.AbstractRelOptPlanner.fireRule(AbstractRelOptPlanner.java:336)
at org.apache.calcite.plan.hep.HepPlanner.applyRule(HepPlanner.java:556)
at org.apache.calcite.plan.hep.HepPlanner.applyRules(HepPlanner.java:420)
at org.apache.calcite.plan.hep.HepPlanner.executeRuleCollection(HepPlanner.java:286)
at org.apache.calcite.plan.hep.HepInstruction$RuleCollection$State.execute(HepInstruction.java:105)
at org.apache.calcite.plan.hep.HepPlanner.lambda$executeProgram$0(HepPlanner.java:211)
at com.google.common.collect.ImmutableList.forEach(ImmutableList.java:423)
at org.apache.calcite.plan.hep.HepPlanner.executeProgram(HepPlanner.java:210)
at org.apache.calcite.plan.hep.HepProgram$State.execute(HepProgram.java:118)
at org.apache.calcite.plan.hep.HepPlanner.executeProgram(HepPlanner.java:205)
at org.apache.calcite.plan.hep.HepPlanner.findBestExp(HepPlanner.java:191)
at org.apache.ignite.internal.sql.engine.prepare.IgnitePrograms.lambda$hep$0(IgnitePrograms.java:69)
at org.apache.ignite.internal.sql.engine.prepare.IgnitePlanner.transform(IgnitePlanner.java:386)
at org.apache.ignite.internal.sql.engine.prepare.PlannerHelper.optimize(PlannerHelper.java:151)
at org.apache.ignite.internal.sql.engine.prepare.PrepareServiceImpl.doOptimize(PrepareServiceImpl.java:754)
at org.apache.ignite.internal.sql.engine.prepare.PrepareServiceImpl.lambda$prepareQuery$5(PrepareServiceImpl.java:411)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
... 3 more
{noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)