Skip to content

Move UnnestNode to SPI and add to collector optimizer#25317

Merged
feilong-liu merged 1 commit intoprestodb:masterfrom
feilong-liu:unnest_connector
Jun 26, 2025
Merged

Move UnnestNode to SPI and add to collector optimizer#25317
feilong-liu merged 1 commit intoprestodb:masterfrom
feilong-liu:unnest_connector

Conversation

@feilong-liu
Copy link
Contributor

@feilong-liu feilong-liu commented Jun 13, 2025

Description

Move UnnestNode to SPI, so that it can be used in connector optimizer. Similar to #24088

Most part of the change is refactoring the import path for this node. 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

Impact

Make UnnestNode available in connector optimizer

Test Plan

Existing unit tests

Contributor checklist

  • Please make sure your submission complies with our contributing guide, in particular code style and commit standards.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.

Release Notes

Please follow release notes guidelines and fill in the release notes below.

== RELEASE NOTES ==

General Changes
* Move UnnestNode to SPI, make it available in collector optimizer

@feilong-liu feilong-liu requested a review from a team as a code owner June 13, 2025 16:35
@feilong-liu feilong-liu requested a review from hantangwangd June 13, 2025 16:35
@prestodb-ci prestodb-ci added the from:Meta PR from Meta label Jun 13, 2025
@feilong-liu feilong-liu marked this pull request as draft June 13, 2025 16:35
@feilong-liu feilong-liu force-pushed the unnest_connector branch 8 times, most recently from d53aca1 to 49def2b Compare June 14, 2025 06:37
@feilong-liu feilong-liu marked this pull request as ready for review June 14, 2025 15:50
@feilong-liu feilong-liu requested a review from a team as a code owner June 14, 2025 15:50
} // namespace facebook::presto::protocol::hive
namespace facebook::presto::protocol::hive {
struct Table {
std::shared_ptr<String> catalogName = {};
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea what this is, but this is what the tool generated running make presto_protocol

- { name: TopNNode, key: .TopNNode }
- { name: TopNRowNumberNode, key: com.facebook.presto.sql.planner.plan.TopNRowNumberNode }
- { name: UnnestNode, key: com.facebook.presto.sql.planner.plan.UnnestNode }
- { name: UnnestNode, key: .UnnestNode }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

protocol change

- { name: TopNNode, key: .TopNNode }
- { name: TopNRowNumberNode, key: com.facebook.presto.sql.planner.plan.TopNRowNumberNode }
- { name: UnnestNode, key: com.facebook.presto.sql.planner.plan.UnnestNode }
- { name: UnnestNode, key: .UnnestNode }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

protocol change

@Immutable
public class UnnestNode
extends InternalPlanNode
public final class UnnestNode
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

main change in this file

@steveburnett
Copy link
Contributor

Thanks for the release note entry! Nit: suggest revising the entry to begin with one of the keywords in the Order of changes of the Release Notes Guidelines. Maybe something like this?

== RELEASE NOTES ==

General Changes
* Improve the collector optimizer by moving UnnestNode to SPI. 

@feilong-liu feilong-liu merged commit 3c1de84 into prestodb:master Jun 26, 2025
108 checks passed
@feilong-liu feilong-liu deleted the unnest_connector branch June 26, 2025 16:10
@prestodb-ci prestodb-ci mentioned this pull request Jul 28, 2025
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

from:Meta PR from Meta

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants