You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by am...@apache.org on 2025/07/29 12:15:37 UTC
(ignite-3) branch ignite-26014 created (now dd2219aab05)
This is an automated email from the ASF dual-hosted git repository.
amashenkov pushed a change to branch ignite-26014
in repository https://gitbox.apache.org/repos/asf/ignite-3.git
at dd2219aab05 wip
This branch includes the following new commits:
new dd2219aab05 wip
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(ignite-3) 01/01: wip
Posted by am...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
amashenkov pushed a commit to branch ignite-26014
in repository https://gitbox.apache.org/repos/asf/ignite-3.git
commit dd2219aab05e52b7780a83199a1da3685cebd6b8
Author: amashenkov <am...@apache.org>
AuthorDate: Tue Jul 29 15:15:25 2025 +0300
wip
---
.../org/apache/ignite/internal/sql/engine/ItDmlTest.java | 15 +++++++++++++++
.../sql/engine/prepare/IgniteSqlToRelConvertor.java | 2 --
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItDmlTest.java b/modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItDmlTest.java
index 749a384ab0f..7d04a45eeb6 100644
--- a/modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItDmlTest.java
+++ b/modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItDmlTest.java
@@ -557,6 +557,21 @@ public class ItDmlTest extends BaseSqlIntegrationTest {
);
}
+ @Test
+ public void testMergeWithSubquery() {
+ sqlScript("CREATE TABLE t1 (id INT PRIMARY KEY, val1 INT, val2 INT);\n"
+ + "CREATE TABLE t2 (id INT PRIMARY KEY, val1 INT, val2 INT, val3 INT, val4 INT, val5 INT);\n"
+ + "\n"
+ + "MERGE INTO t1 dst\n"
+ + " USING (\n"
+ + " SELECT t1.id, t2.val5\n"
+ + " FROM t1 LEFT JOIN t2 ON t1.id = t2.id\n"
+ + " ) src\n"
+ + " ON src.id = dst.id\n"
+ + " WHEN MATCHED THEN UPDATE SET val1 = src.val5\n"
+ + " WHEN NOT MATCHED THEN INSERT (id, val1) VALUES (src.id, src.val5)");
+ }
+
/**
* Test verifies that scan is executed within provided transaction.
*/
diff --git a/modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/prepare/IgniteSqlToRelConvertor.java b/modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/prepare/IgniteSqlToRelConvertor.java
index 0220e52aa28..cf30a328933 100644
--- a/modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/prepare/IgniteSqlToRelConvertor.java
+++ b/modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/prepare/IgniteSqlToRelConvertor.java
@@ -246,8 +246,6 @@ public class IgniteSqlToRelConvertor extends SqlToRelConverter implements Initia
RelNode input = insertRel.getInput(0);
if (input instanceof LogicalProject) {
- level1InsertExprs = ((LogicalProject) input).getProjects();
- } else {
// TODO https://issues.apache.org/jira/browse/IGNITE-22293
// convertInsert() may return LogicalTableModify without projection in the input.
// As a workaround for this case, we additionally build required column expressions.