This is an automated email from the ASF dual-hosted git repository.

zstan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
     new 083199e017d IGNITE-28890 Calcite. Remove ambiguous calcite issues 
mentions (#13370)
083199e017d is described below

commit 083199e017db999cf91193d87a27f6c39a58fa06
Author: Evgeniy Stanilovskiy <[email protected]>
AuthorDate: Wed Jul 15 15:26:07 2026 +0300

    IGNITE-28890 Calcite. Remove ambiguous calcite issues mentions (#13370)
---
 .../query/calcite/prepare/IgniteTypeCoercion.java          | 14 --------------
 .../processors/query/calcite/type/IgniteTypeFactory.java   |  7 -------
 .../query/calcite/integration/JoinIntegrationTest.java     | 13 ++++++-------
 .../query/calcite/planner/JoinWithUsingPlannerTest.java    |  7 +++----
 4 files changed, 9 insertions(+), 32 deletions(-)

diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/IgniteTypeCoercion.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/IgniteTypeCoercion.java
index 2c719e0297a..96eb4233f1b 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/IgniteTypeCoercion.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/prepare/IgniteTypeCoercion.java
@@ -198,20 +198,6 @@ public class IgniteTypeCoercion extends TypeCoercionImpl {
         return super.needToCast(scope, node, toType);
     }
 
-    /** {@inheritDoc} */
-    @Override public @Nullable RelDataType getTightestCommonType(@Nullable 
RelDataType type1, @Nullable RelDataType type2) {
-        // TODO Workaround for 
https://issues.apache.org/jira/browse/CALCITE-7062
-        if (type1 != null && type2 != null) {
-            if (SqlTypeUtil.isDate(type1) && SqlTypeUtil.isTimestamp(type2))
-                return factory.createTypeWithNullability(type2, 
type1.isNullable() || type2.isNullable());
-
-            if (SqlTypeUtil.isDate(type2) && SqlTypeUtil.isTimestamp(type1))
-                return factory.createTypeWithNullability(type1, 
type1.isNullable() || type2.isNullable());
-        }
-
-        return super.getTightestCommonType(type1, type2);
-    }
-
     // The method is fully copied from parent class with cutted operand check 
to SqlDynamicParam, which not supported.
     /** {@inheritDoc} */
     @Override protected boolean coerceColumnType(
diff --git 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/type/IgniteTypeFactory.java
 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/type/IgniteTypeFactory.java
index fa426783071..59d19b9817d 100644
--- 
a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/type/IgniteTypeFactory.java
+++ 
b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/type/IgniteTypeFactory.java
@@ -393,11 +393,4 @@ public class IgniteTypeFactory extends JavaTypeFactoryImpl 
{
         if (unsupportedTypeName != null)
             throw new IgniteException("Type '" + unsupportedTypeName + "' is 
not supported.");
     }
-
-    /** {@inheritDoc} */
-    @Override public RelDataType createUnknownType() {
-        // TODO workaround for 
https://issues.apache.org/jira/browse/CALCITE-5297
-        // Remove this after update to Calcite 1.33.
-        return createTypeWithNullability(super.createUnknownType(), true);
-    }
 }
diff --git 
a/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/JoinIntegrationTest.java
 
b/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/JoinIntegrationTest.java
index f115ae3ea15..ee797b3137e 100644
--- 
a/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/JoinIntegrationTest.java
+++ 
b/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/JoinIntegrationTest.java
@@ -1232,13 +1232,12 @@ public class JoinIntegrationTest extends 
AbstractBasicIntegrationTransactionalTe
             .check();
 
         // Columns - not ambiguous.
-        // TODO https://issues.apache.org/jira/browse/CALCITE-4915
-        //assertQuery("SELECT c1, c2, c3 FROM t1 NATURAL JOIN t2 ORDER BY c1, 
c2, c3")
-        //    .returns(1, 1, 1)
-        //    .returns(2, 2, 2)
-        //    .returns(3, 3, 3)
-        //    .returns(4, 4, 4)
-        //    .check();
+        assertQuery("SELECT c1, c2, c3 FROM t1 NATURAL JOIN t2 ORDER BY c1, 
c2, c3")
+            .returns(1, 1, 1)
+            .returns(2, 2, 2)
+            .returns(3, 3, 3)
+            .returns(4, 4, 4)
+            .check();
     }
 
     /** {@inheritDoc} */
diff --git 
a/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/planner/JoinWithUsingPlannerTest.java
 
b/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/planner/JoinWithUsingPlannerTest.java
index 9dd2cedf34b..66683b75539 100644
--- 
a/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/planner/JoinWithUsingPlannerTest.java
+++ 
b/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/planner/JoinWithUsingPlannerTest.java
@@ -151,9 +151,8 @@ public class JoinWithUsingPlannerTest extends 
AbstractPlannerTest {
             hasColumns("EMPID", "DEPTID", "NAME", "D"));
 
         // Double join.
-        // TODO https://issues.apache.org/jira/browse/CALCITE-4921
-        //assertPlan("SELECT * FROM T1 NATURAL JOIN T2 NATURAL JOIN OTHER.T3", 
schemas,
-        //    hasColumns("DEPTID", "EMPTID", "NAME", "PARENTID", "D"));
+        assertPlan("SELECT * FROM T1 NATURAL JOIN T2 NATURAL JOIN OTHER.T3", 
schemas,
+            hasColumns("EMPID", "DEPTID", "NAME", "PARENTID", "D"));
 
         // Join table with subquery.
         assertPlan("SELECT * FROM T1 NATURAL JOIN (SELECT * FROM T2)", schemas,
@@ -164,7 +163,7 @@ public class JoinWithUsingPlannerTest extends 
AbstractPlannerTest {
             hasColumns("DEPTID", "NAME", "EMPID", "PARENTID"));
 
         // Select explicit columns, system columns. Columns not ambiguous.
-        // TODO https://issues.apache.org/jira/browse/CALCITE-4915
+        // TODO https://issues.apache.org/jira/browse/CALCITE-4923
         //assertPlan("SELECT DEPTID, T1._KEY, T2.NAME FROM T1 NATURAL JOIN 
T2", schemas,
         //    hasColumns("DEPTID", "_KEY", "NAME"));
 

Reply via email to