Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[refactor]Extract WindowNode.Specification as a separate class #25033

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

Merged
merged 1 commit into from
May 6, 2025

Conversation

mohsaka
Copy link
Contributor

@mohsaka mohsaka commented May 2, 2025

Description

Extract WindowNode.Specification as a separate class to clean up TVF Porting PR which can be viewed here
#25032

Changes adapted from trino/PR#14175

Had to regenerate Presto Protocol due to renaming of Specification -> DataOrganizationSpecification.

Motivation and Context

WindowNode.Specification/DataOrganizationSpecification is utilized in table functions to store the order by and partition by properties for the table function. Therefore it is no longer WindowNode specific.

Impact

None.

Test Plan

No underlying changes.

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.

== NO RELEASE NOTE ==

@mohsaka mohsaka requested a review from a team as a code owner May 2, 2025 16:30
@mohsaka mohsaka requested a review from ZacBlanco May 2, 2025 16:30
@prestodb-ci prestodb-ci added the from:IBM PR from IBM label May 2, 2025
@prestodb-ci prestodb-ci requested review from a team, bibith4 and namya28 and removed request for a team May 2, 2025 16:30
@mohsaka mohsaka requested a review from a team as a code owner May 2, 2025 23:34
Copy link
Contributor

@ZacBlanco ZacBlanco left a comment

Choose a reason for hiding this comment

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

LGTM- Just two questions on the protocol change

@mohsaka mohsaka force-pushed the tvf_data branch 4 times, most recently from 201bf92 to 37a1655 Compare May 5, 2025 17:28
@mohsaka mohsaka requested a review from ZacBlanco May 5, 2025 17:29
ZacBlanco
ZacBlanco previously approved these changes May 5, 2025
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.

Thanks @mohsaka

For the second commit on the protocol changes:
i) Change title to [native] Protocol changes for WindowNode.Specification

ii) Wanted to confirm that you generated the protocol changes using the instructions documented here : https://github.com/prestodb/presto/tree/master/presto-native-execution/presto_cpp/presto_protocol#presto-native-worker-protocol-code-generation

iii) Also, do you really want to separate the commit... Presto PRs do not squash commits before submission... So the build would be broken between the 2 commits.

Copy link
Contributor

Choose a reason for hiding this comment

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

Lets separate this in its own PR. I can take that up.

Copy link
Contributor

Choose a reason for hiding this comment

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

@mohsaka
Copy link
Contributor Author

mohsaka commented May 5, 2025

Thanks @mohsaka

For the second commit on the protocol changes: i) Change title to [native] Protocol changes for WindowNode.Specification

ii) Wanted to confirm that you generated the protocol changes using the instructions documented here : https://github.com/prestodb/presto/tree/master/presto-native-execution/presto_cpp/presto_protocol#presto-native-worker-protocol-code-generation

iii) Also, do you really want to separate the commit... Presto PRs do not squash commits before submission... So the build would be broken between the 2 commits.

Will combine the commits. Did follow those instructions, but provided by Christian directly not via the doc. But they were the same steps.

@@ -194,6 +194,7 @@ void from_json(const json& j, Storage& p);
} // namespace facebook::presto::protocol::hive
namespace facebook::presto::protocol::hive {
struct Table {
std::shared_ptr<String> catalogName = {};
Copy link
Contributor

Choose a reason for hiding this comment

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

This change is picked up from #24235 looks like it only affects the metadata layer and not Prestissimo runtime. While it shouldn't affect any read/write behavior, is it ever used in error messages maybe ?

@majetideepak : Can you confirm

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If needed I can remove these changes from my PR.

Changes adapted from trino/PR#14175
Author: kasiafi

Additional changes include:
Presto protocol changes caused by Specification -> DataOrganizationSpecification change.

Co-authored-by: kasiafi <[email protected]>
Co-authored-by: mohsaka <[email protected]>
Co-authored-by: Xin Zhang <[email protected]>
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.

Thanks @mohsaka

@mohsaka
Copy link
Contributor Author

mohsaka commented May 5, 2025

@aditi-pandit @ZacBlanco Issue opened here. Will post on the PR as well.

#25049

@mohsaka mohsaka merged commit 87059e5 into prestodb:master May 6, 2025
106 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
from:IBM PR from IBM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants