- 
                Notifications
    
You must be signed in to change notification settings  - Fork 5.5k
 
feat(pos-sorted-exchange): Add sorted exchange support in presto-on-spark #26403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
3161b24
              130b14f
              6951cab
              960bc93
              File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -190,6 +190,7 @@ | |
| import com.facebook.presto.sql.planner.optimizations.ShardJoins; | ||
| import com.facebook.presto.sql.planner.optimizations.SimplifyPlanWithEmptyInput; | ||
| import com.facebook.presto.sql.planner.optimizations.SortMergeJoinOptimizer; | ||
| import com.facebook.presto.sql.planner.optimizations.SortedExchangeRule; | ||
| import com.facebook.presto.sql.planner.optimizations.StatsRecordingPlanOptimizer; | ||
| import com.facebook.presto.sql.planner.optimizations.TransformQuantifiedComparisonApplyToLateralJoin; | ||
| import com.facebook.presto.sql.planner.optimizations.UnaliasSymbolReferences; | ||
| 
          
            
          
           | 
    @@ -947,8 +948,10 @@ public PlanOptimizers( | |
| // MergeJoinForSortedInputOptimizer can avoid the local exchange for a join operation | ||
| // Should be placed after AddExchanges, but before AddLocalExchange | ||
| // To replace the JoinNode to MergeJoin ahead of AddLocalExchange to avoid adding extra local exchange | ||
| // SortedExchangeRule pushes sorts down to exchange nodes for distributed queries | ||
| builder.add(new MergeJoinForSortedInputOptimizer(metadata, featuresConfig.isNativeExecutionEnabled()), | ||
| new SortMergeJoinOptimizer(metadata, featuresConfig.isNativeExecutionEnabled())); | ||
| new SortMergeJoinOptimizer(metadata, featuresConfig.isNativeExecutionEnabled()), | ||
| new SortedExchangeRule(metadata)); | ||
| 
         There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shall we gate this optimizer only for Presto-on-Spark? we can leverage  There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this a new feature flag we have added. Like mentioned above so far we have refrained from adding   | 
||
| 
     | 
||
| // Optimizers above this don't understand local exchanges, so be careful moving this. | ||
| builder.add(new AddLocalExchanges(metadata, featuresConfig.isNativeExecutionEnabled())); | ||
| 
          
            
          
           | 
    ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about rename:
enable_sorted_exchanges ->sorted_exchanges_enabled
isEnableSortedExchanges -> isSortedExchangesEnabled