Skip to content

Move Delete TableWriter TableFinish node to SPI#24088

Merged
feilong-liu merged 1 commit intoprestodb:masterfrom
feilong-liu:node_spi
Nov 21, 2024
Merged

Move Delete TableWriter TableFinish node to SPI#24088
feilong-liu merged 1 commit intoprestodb:masterfrom
feilong-liu:node_spi

Conversation

@feilong-liu
Copy link
Contributor

@feilong-liu feilong-liu commented Nov 19, 2024

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

  • Please make sure your submission complies with our development, formatting, commit message, and attribution guidelines.
  • 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
* Add Delete TableWriter TableFinish node to SPI :pr:`24088`

@feilong-liu feilong-liu marked this pull request as draft November 19, 2024 19:31
@feilong-liu feilong-liu force-pushed the node_spi branch 8 times, most recently from 387fcd4 to 9d8a5f2 Compare November 19, 2024 22:15
enableStatsCollectionForTemporaryTable ? Optional.of(statisticsResult.getDescriptor()) : Optional.empty());
}

public static StatisticAggregations.Parts splitIntoPartialAndFinal(StatisticAggregations statisticAggregations, VariableAllocator variableAllocator, FunctionAndTypeManager functionAndTypeManager)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

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
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved to SPI

@feilong-liu feilong-liu marked this pull request as ready for review November 20, 2024 00:44
@feilong-liu feilong-liu requested a review from a team as a code owner November 20, 2024 00:44
Copy link
Contributor

@aditi-pandit aditi-pandit left a comment

Choose a reason for hiding this comment

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

For Native engine changes.

@steveburnett
Copy link
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants