[
https://issues.apache.org/jira/browse/IGNITE-26203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Konstantin Orlov updated IGNITE-26203:
--------------------------------------
Ignite Flags: Release Notes Required (was: Docs Required,Release Notes
Required)
> 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
> Fix For: 3.2
>
> Time Spent: 1h 40m
> 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)