forked from facebookincubator/velox
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add dynamic filter operator stats for Prestissimo HBO (facebookincuba…
…tor#9652) Summary: Add dynamic filter operator stats for Presto coordinator to generate query plan with HBO optimization for Prestissimo. Velox might optimize the local query execution by adding dynamic filters at the runtime. For instance, after hash build operator builds the join table, it might generate dynamic filters based on the join key distribution and pushes down the dynamic produced filter to the table scan operator of probe side. This might filter out a lot of raw input rows. Currently, Presto HBO is not aware of the dynamic filtering at the native worker side running with Velox runtime. It might think the probe side is much smaller than the build side and the generate the optimized plan for the next run by flipping the build and probe side. This is not a good optimization and will slow down the query execution by triggering the unnecessary spilling as raw inputs for the original probe side could be very large. We have found this in Meta internal shadowing test. This PR exposes the dynamic filter stats in operator stats to Prestissimo, and the latter reports this to the Presto coordinator which might choose to skip such HBO optimization if the dynamic filter pushdown has been triggered at worker side. The dynamic filter stats include the plan node id set of the dynamic filter producers. The actual filtered rows could be calculated by inputPositions and rawInputPositions stats in operator stats. Also note we can't have exact the number of filtered rows as for table scan, it can have scan filter pushdown as well, and filters could be merged together. The driver framework needs extend addDynamicFilter API to include the producer plan node id for recording. Pull Request resolved: facebookincubator#9652 Reviewed By: mbasmanova Differential Revision: D56709420 Pulled By: xiaoxmeng fbshipit-source-id: d80127076b4df13445d4c6e3fdec21e5315db1ab
- Loading branch information
1 parent
714b747
commit 3e90a7e
Showing
15 changed files
with
262 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.