[ https://issues.apache.org/jira/browse/IGNITE-25093?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Maksim Zhuravkov updated IGNITE-25093: -------------------------------------- Description: Upgrade to calcite 1.39 caused a changed in a plan. Before updated: {noformat} N0 SELECT t.c1 FROM t_n1 t WHERE t.c1 < 5 AND EXISTS (SELECT x FROM table(system_range(t.c1, t.c2)) WHERE mod(x, 2) = 0) {noformat} {noformat} --- Fragment#0 root executionNodes: [N0] remoteFragments: [1] exchangeSourceNodes: {1=[N1]} tree: Project CorrelatedNestedLoopJoin Receiver(sourceFragment=1, exchange=1, distribution=single) ColocatedHashAggregate Project Filter TableFunctionScan(source=2, distribution=single) Fragment#1 targetNodes: [N0] executionNodes: [N1] tables: [T_N1] partitions: {N1=[0:1]} tree: Sender(targetFragment=0, exchange=1, distribution=single) >>> TableScan(name=PUBLIC.T_N1, source=3, partitions=1, >>> distribution=affinity[table: T_N1, columns: [ID]]) {noformat} After: {noformat} --- Fragment#0 root executionNodes: [N0] remoteFragments: [1] exchangeSourceNodes: {1=[N1]} tree: Project CorrelatedNestedLoopJoin Receiver(sourceFragment=1, exchange=1, distribution=single) ColocatedHashAggregate Project Filter TableFunctionScan(source=2, distribution=single) Fragment#1 targetNodes: [N0] executionNodes: [N1] tables: [T_N1] partitions: {N1=[0:1]} tree: Sender(targetFragment=0, exchange=1, distribution=single) >>> TableScan(name=PUBLIC.T_N1, source=3, partitions=1, >>> distribution=random) {noformat} was: Upgrade to calcite 1.39 caused a changed in a plan. Before updated: {noformat} N0 SELECT t.c1 FROM t_n1 t WHERE t.c1 < 5 AND EXISTS (SELECT x FROM table(system_range(t.c1, t.c2)) WHERE mod(x, 2) = 0) --- Fragment#0 root executionNodes: [N0] remoteFragments: [1] exchangeSourceNodes: {1=[N1]} tree: Project CorrelatedNestedLoopJoin Receiver(sourceFragment=1, exchange=1, distribution=single) ColocatedHashAggregate Project Filter TableFunctionScan(source=2, distribution=single) Fragment#1 targetNodes: [N0] executionNodes: [N1] tables: [T_N1] partitions: {N1=[0:1]} tree: Sender(targetFragment=0, exchange=1, distribution=single) >>> TableScan(name=PUBLIC.T_N1, source=3, partitions=1, >>> distribution=affinity[table: T_N1, columns: [ID]]) {noformat} After: {noformat} N0 SELECT t.c1 FROM t_n1 t WHERE t.c1 < 5 AND EXISTS (SELECT x FROM table(system_range(t.c1, t.c2)) WHERE mod(x, 2) = 0) --- Fragment#0 root executionNodes: [N0] remoteFragments: [1] exchangeSourceNodes: {1=[N1]} tree: Project CorrelatedNestedLoopJoin Receiver(sourceFragment=1, exchange=1, distribution=single) ColocatedHashAggregate Project Filter TableFunctionScan(source=2, distribution=single) Fragment#1 targetNodes: [N0] executionNodes: [N1] tables: [T_N1] partitions: {N1=[0:1]} tree: Sender(targetFragment=0, exchange=1, distribution=single) >>> TableScan(name=PUBLIC.T_N1, source=3, partitions=1, >>> distribution=random) {noformat} > Sql. FragmentMappingTest testCorrelated uses random distribution instead of > affinity > ------------------------------------------------------------------------------------ > > Key: IGNITE-25093 > URL: https://issues.apache.org/jira/browse/IGNITE-25093 > Project: Ignite > Issue Type: Bug > Components: sql > Reporter: Maksim Zhuravkov > Priority: Major > Labels: ignite-3 > > Upgrade to calcite 1.39 caused a changed in a plan. Before updated: > {noformat} > N0 > SELECT t.c1 FROM t_n1 t WHERE t.c1 < 5 AND > EXISTS (SELECT x FROM table(system_range(t.c1, t.c2)) WHERE mod(x, 2) = 0) > {noformat} > {noformat} > --- > Fragment#0 root > executionNodes: [N0] > remoteFragments: [1] > exchangeSourceNodes: {1=[N1]} > tree: > Project > CorrelatedNestedLoopJoin > Receiver(sourceFragment=1, exchange=1, distribution=single) > ColocatedHashAggregate > Project > Filter > TableFunctionScan(source=2, distribution=single) > Fragment#1 > targetNodes: [N0] > executionNodes: [N1] > tables: [T_N1] > partitions: {N1=[0:1]} > tree: > Sender(targetFragment=0, exchange=1, distribution=single) > >>> TableScan(name=PUBLIC.T_N1, source=3, partitions=1, > >>> distribution=affinity[table: T_N1, columns: [ID]]) > {noformat} > After: > {noformat} > --- > Fragment#0 root > executionNodes: [N0] > remoteFragments: [1] > exchangeSourceNodes: {1=[N1]} > tree: > Project > CorrelatedNestedLoopJoin > Receiver(sourceFragment=1, exchange=1, distribution=single) > ColocatedHashAggregate > Project > Filter > TableFunctionScan(source=2, distribution=single) > Fragment#1 > targetNodes: [N0] > executionNodes: [N1] > tables: [T_N1] > partitions: {N1=[0:1]} > tree: > Sender(targetFragment=0, exchange=1, distribution=single) > >>> TableScan(name=PUBLIC.T_N1, source=3, partitions=1, > >>> distribution=random) > {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)