Balazs Hevele has uploaded this change for review. ( https://gerrit.cloudera.org/25332
Change subject: PROTOTYPE: Clean up rows in joins when a runtime filter is late ...................................................................... PROTOTYPE: Clean up rows in joins when a runtime filter is late When a runtime filter takes long to build, scanners will start scanning rows without it until it arrives. Scanners wait up to RUNTIME_FILTER_WAIT_TIME_MS milliseconds. When a scanner starts before the runtime filter arrives, and starts sending rows to a join's builder, rows that wouldn't pass the filter get permanently added to the join's hash table, and its own runtime filter(s), using up more time processing them, and extra more. In a chained join scenario, this effect can cascade with each join. This optimization removes these extra rows from the join's hash tables and runtime filter(s) if and when the runtime filter gets finished before the join builder finishes the build. If the runtime filter arrives within this timeframe, all accumulated rows in all partitions are filtered through it, by rebuilding the rows' buffers with only the passing rows. The join's runtime bloom filters are also recalculated. The join build also saves a set of rows for a quick selectivity check: if less than a given percentage of these rows fail the filter, the clean up is not done. This is to avoid spending the time to clean up when the filter is not selective, and not expected to remove a significant amount of rows. Limitations: -the optimization doesn't take effect if any of the partitions are spilled Change-Id: Idafe523ba35cb0365b5298b851f0a8697f5cbb20 Assisted-by: Claude Sonnet 5.5 (GitHub Copilot) --- M be/src/exec/partitioned-hash-join-builder.cc M be/src/exec/partitioned-hash-join-builder.h M be/src/runtime/query-state.cc M be/src/service/query-options.cc M be/src/service/query-options.h M common/thrift/DataSinks.thrift M common/thrift/ImpalaService.thrift M common/thrift/Query.thrift M fe/src/main/java/org/apache/impala/planner/JoinBuildSink.java M fe/src/main/java/org/apache/impala/planner/ParallelPlanner.java 10 files changed, 478 insertions(+), 3 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/32/25332/1 -- To view, visit https://gerrit.cloudera.org/25332 To unsubscribe, visit https://gerrit.cloudera.org/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Idafe523ba35cb0365b5298b851f0a8697f5cbb20 Gerrit-Change-Number: 25332 Gerrit-PatchSet: 1 Gerrit-Owner: Balazs Hevele <[email protected]>
