Move Delete TableWriter TableFinish node to SPI#24088
Merged
Merged
Conversation
387fcd4 to
9d8a5f2
Compare
feilong-liu
commented
Nov 19, 2024
| enableStatsCollectionForTemporaryTable ? Optional.of(statisticsResult.getDescriptor()) : Optional.empty()); | ||
| } | ||
|
|
||
| public static StatisticAggregations.Parts splitIntoPartialAndFinal(StatisticAggregations statisticAggregations, VariableAllocator variableAllocator, FunctionAndTypeManager functionAndTypeManager) |
Contributor
Author
There was a problem hiding this comment.
Moved from StatisticAggregations, as it's moved to SPI which has no access to FunctionAndTypeManager
| import static com.google.common.base.Preconditions.checkArgument; | ||
| import static java.util.Objects.requireNonNull; | ||
|
|
||
| public class StatisticAggregations |
9d8a5f2 to
0df90af
Compare
aditi-pandit
approved these changes
Nov 20, 2024
aditi-pandit
left a comment
Contributor
There was a problem hiding this comment.
For Native engine changes.
Contributor
|
Thanks for the release note entry! Please revise it to follow the Order of changes in the Release Note Guidelines to begin the line with Fix, Improve, and so on. |
rschlussel
approved these changes
Nov 21, 2024
This was referenced Jan 28, 2025
This was referenced Mar 7, 2025
6 tasks
feilong-liu
added a commit
that referenced
this pull request
Feb 27, 2026
…cess (#27232) ## Description Similar to changes in #24088 Summary: Move TopNRowNumberNode from presto-main-base to presto-spi to make it accessible to connector optimizers in ApplyConnectorOptimization.java. Changes: - Move TopNRowNumberNode.java to presto-spi/src/main/java/com/facebook/presto/spi/plan/ - Change extends InternalPlanNode to extends PlanNode - Add visitTopNRowNumber to PlanVisitor.java - Remove visitTopNRowNumber from InternalPlanVisitor.java - Add TopNRowNumberNode to CONNECTOR_ACCESSIBLE_PLAN_NODES - Update all imports across the codebase - Update protocol YAML files to use .TopNRowNumberNode key - Regenerate C++ protocol files Differential Revision: D94627414 ## Motivation and Context As in description ## Impact As in description ## Test Plan Existing unit tests ``` == NO RELEASE NOTE == ``` ## Summary by Sourcery Expose TopNRowNumberNode as a connector-accessible SPI plan node and align protocol/serialization support. Enhancements: - Move TopNRowNumberNode from presto-main-base into presto-spi as a PlanNode with a PlanVisitor hook so connector optimizers can see and transform it. - Tighten TopNRowNumberNode child handling and output variable construction using standard collections utilities instead of Guava. - Add a catchableByTry field to ErrorCode in the native protocol to support JSON round-tripping. Build: - Update Java/C++ protocol YAML mappings and generated native protocol code to use the shortened .TopNRowNumberNode type key instead of the old fully qualified class name.
feilong-liu
added a commit
that referenced
this pull request
Mar 2, 2026
…cess (#27232) ## Description Similar to changes in #24088 Summary: Move TopNRowNumberNode from presto-main-base to presto-spi to make it accessible to connector optimizers in ApplyConnectorOptimization.java. Changes: - Move TopNRowNumberNode.java to presto-spi/src/main/java/com/facebook/presto/spi/plan/ - Change extends InternalPlanNode to extends PlanNode - Add visitTopNRowNumber to PlanVisitor.java - Remove visitTopNRowNumber from InternalPlanVisitor.java - Add TopNRowNumberNode to CONNECTOR_ACCESSIBLE_PLAN_NODES - Update all imports across the codebase - Update protocol YAML files to use .TopNRowNumberNode key - Regenerate C++ protocol files Differential Revision: D94627414 ## Motivation and Context As in description ## Impact As in description ## Test Plan Existing unit tests ``` == NO RELEASE NOTE == ``` ## Summary by Sourcery Expose TopNRowNumberNode as a connector-accessible SPI plan node and align protocol/serialization support. Enhancements: - Move TopNRowNumberNode from presto-main-base into presto-spi as a PlanNode with a PlanVisitor hook so connector optimizers can see and transform it. - Tighten TopNRowNumberNode child handling and output variable construction using standard collections utilities instead of Guava. - Add a catchableByTry field to ErrorCode in the native protocol to support JSON round-tripping. Build: - Update Java/C++ protocol YAML mappings and generated native protocol code to use the shortened .TopNRowNumberNode type key instead of the old fully qualified class name.
feilong-liu
added a commit
that referenced
this pull request
Mar 2, 2026
…cess (#27232) ## Description Similar to changes in #24088 Summary: Move TopNRowNumberNode from presto-main-base to presto-spi to make it accessible to connector optimizers in ApplyConnectorOptimization.java. Changes: - Move TopNRowNumberNode.java to presto-spi/src/main/java/com/facebook/presto/spi/plan/ - Change extends InternalPlanNode to extends PlanNode - Add visitTopNRowNumber to PlanVisitor.java - Remove visitTopNRowNumber from InternalPlanVisitor.java - Add TopNRowNumberNode to CONNECTOR_ACCESSIBLE_PLAN_NODES - Update all imports across the codebase - Update protocol YAML files to use .TopNRowNumberNode key - Regenerate C++ protocol files Differential Revision: D94627414 ## Motivation and Context As in description ## Impact As in description ## Test Plan Existing unit tests ``` == NO RELEASE NOTE == ``` ## Summary by Sourcery Expose TopNRowNumberNode as a connector-accessible SPI plan node and align protocol/serialization support. Enhancements: - Move TopNRowNumberNode from presto-main-base into presto-spi as a PlanNode with a PlanVisitor hook so connector optimizers can see and transform it. - Tighten TopNRowNumberNode child handling and output variable construction using standard collections utilities instead of Guava. - Add a catchableByTry field to ErrorCode in the native protocol to support JSON round-tripping. Build: - Update Java/C++ protocol YAML mappings and generated native protocol code to use the shortened .TopNRowNumberNode type key instead of the old fully qualified class name.
msmygit
pushed a commit
to msmygit/presto
that referenced
this pull request
Jun 3, 2026
…cess (prestodb#27232) ## Description Similar to changes in prestodb#24088 Summary: Move TopNRowNumberNode from presto-main-base to presto-spi to make it accessible to connector optimizers in ApplyConnectorOptimization.java. Changes: - Move TopNRowNumberNode.java to presto-spi/src/main/java/com/facebook/presto/spi/plan/ - Change extends InternalPlanNode to extends PlanNode - Add visitTopNRowNumber to PlanVisitor.java - Remove visitTopNRowNumber from InternalPlanVisitor.java - Add TopNRowNumberNode to CONNECTOR_ACCESSIBLE_PLAN_NODES - Update all imports across the codebase - Update protocol YAML files to use .TopNRowNumberNode key - Regenerate C++ protocol files Differential Revision: D94627414 ## Motivation and Context As in description ## Impact As in description ## Test Plan Existing unit tests ``` == NO RELEASE NOTE == ``` ## Summary by Sourcery Expose TopNRowNumberNode as a connector-accessible SPI plan node and align protocol/serialization support. Enhancements: - Move TopNRowNumberNode from presto-main-base into presto-spi as a PlanNode with a PlanVisitor hook so connector optimizers can see and transform it. - Tighten TopNRowNumberNode child handling and output variable construction using standard collections utilities instead of Guava. - Add a catchableByTry field to ErrorCode in the native protocol to support JSON round-tripping. Build: - Update Java/C++ protocol YAML mappings and generated native protocol code to use the shortened .TopNRowNumberNode type key instead of the old fully qualified class name.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
We are adding a new connector optimizer, however the connector optimizer can only access a limited set of plan nodes which are in the SPI directory. In this PR, I move the DeleteNode, TableWriter and TableFinish node to SPI so that they can be used in collector optimizer.
Most part of the change is refactoring the import path for these nodes. Meaningful change is to get rid of functions not available in SPI, mainly Guava libraries, and replace them with java builtin collection methods.
Motivation and Context
To make DeleteNode, TableWriter and TableFinish nodes available in connector optimizer
Impact
Move Delete TableWriter TableFinish node to SPI
Test Plan
Existing unit tests
Contributor checklist
Release Notes
Please follow release notes guidelines and fill in the release notes below.