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

Maksim Zhuravkov commented on IGNITE-26203:
-------------------------------------------

The linked PR also includes metadata propagation for UPDATEs (fixing this 
https://issues.apache.org/jira/browse/IGNITE-24257) and DELETEs.

Follow-up issues: 
 - https://issues.apache.org/jira/browse/IGNITE-28201
 - https://issues.apache.org/jira/browse/IGNITE-28199


> Sql. Partition pruning. No metadata for INSERT INTO table SELECT FROM table
> ---------------------------------------------------------------------------
>
>                 Key: IGNITE-26203
>                 URL: https://issues.apache.org/jira/browse/IGNITE-26203
>             Project: Ignite
>          Issue Type: Improvement
>          Components: sql ai3
>            Reporter: Maksim Zhuravkov
>            Assignee: Maksim Zhuravkov
>            Priority: Major
>              Labels: ignite-3
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Partition pruning metadata is not extracted for the following queries:
> {code:java}
> CREATE TABLE t (c1 INT, c2 INT, c3 INT, PRIMARY KEY (c1, c2))
> INSERT INTO t SELECT * FROM t WHERE c1=? and c1=?
> INSERT INTO t SELECT * FROM t WHERE c1=1 and c1=2
> ...
> {code}
> Reproducer for PartitionPruningTest
> {noformat}
>     @Test
>     public void testInsertFromSelect() throws Exception {
>         IgniteTable table = TestBuilders.table()
>                 .name("T")
>                 .addKeyColumn("C1", NativeTypes.INT32)
>                 .addKeyColumn("C2", NativeTypes.INT32)
>                 .addColumn("C3", NativeTypes.INT32, true)
>                 .distribution(TestBuilders.affinity(List.of(1, 0), 1, 2))
>                 .build();
>         PartitionPruningMetadata actual = extractMetadata(
>                 "INSERT INTO t SELECT * FROM t WHERE c2=42 and c1=99",
>                 table
>         );
>         PartitionPruningColumns cols = actual.get(1);
>         assertNotNull(cols, "No metadata for source=1");
>         assertEquals("[[0=99, 1=42]", 
> PartitionPruningColumns.canonicalForm(cols).toString());
>     }
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to