Aleksey Plekhanov created IGNITE-21031: ------------------------------------------
Summary: Calcite engine. Query fails on performance statistics in case of nested scans Key: IGNITE-21031 URL: https://issues.apache.org/jira/browse/IGNITE-21031 Project: Ignite Issue Type: Bug Reporter: Aleksey Plekhanov Assignee: Aleksey Plekhanov Nested scan can be performed by Calcite engine, for example, in case of UNION ALL, when the first table scan is completed (and {{{}downstream().end(){}}}) method is invoked and UNION ALL operator proceed to the next table scan. Reproducer: {code:java} public void testPerformanceStatisticsNestedScan() throws Exception { sql(grid(0), "CREATE TABLE test_perf_stat_nested (a INT) WITH template=REPLICATED"); sql(grid(0), "INSERT INTO test_perf_stat_nested VALUES (0), (1), (2), (3), (4)"); startCollectStatistics(); sql(grid(0), "SELECT * FROM test_perf_stat_nested UNION ALL SELECT * FROM test_perf_stat_nested"); }{code} Fails on: {noformat} at org.apache.ignite.internal.metric.IoStatisticsQueryHelper.startGatheringQueryStatistics(IoStatisticsQueryHelper.java:35) at org.apache.ignite.internal.processors.query.calcite.exec.tracker.PerformanceStatisticsIoTracker.startTracking(PerformanceStatisticsIoTracker.java:65) at org.apache.ignite.internal.processors.query.calcite.exec.rel.ScanStorageNode.processNextBatch(ScanStorageNode.java:68) at org.apache.ignite.internal.processors.query.calcite.exec.rel.ScanNode.push(ScanNode.java:145) at org.apache.ignite.internal.processors.query.calcite.exec.rel.ScanNode.request(ScanNode.java:95) at org.apache.ignite.internal.processors.query.calcite.exec.rel.UnionAllNode.end(UnionAllNode.java:79) at org.apache.ignite.internal.processors.query.calcite.exec.rel.ScanNode.processNextBatch(ScanNode.java:185) at org.apache.ignite.internal.processors.query.calcite.exec.rel.ScanStorageNode.processNextBatch(ScanStorageNode.java:70) at org.apache.ignite.internal.processors.query.calcite.exec.rel.ScanNode.push(ScanNode.java:145) at org.apache.ignite.internal.processors.query.calcite.exec.rel.ScanNode.request(ScanNode.java:95) at org.apache.ignite.internal.processors.query.calcite.exec.rel.UnionAllNode.request(UnionAllNode.java:56) {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010)