Skip to content
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

feat: add ExchangeRel as a type in Rel #518

Merged
merged 1 commit into from
Jul 21, 2023

Conversation

whutjs
Copy link
Contributor

@whutjs whutjs commented Jul 12, 2023

The ExchangeRel is already in the spec, but it is not a type of Rel yet.

@CLAassistant
Copy link

CLAassistant commented Jul 12, 2023

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link

ACTION NEEDED

Substrait follows the Conventional Commits
specification
for
release automation.

The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification.

@whutjs whutjs force-pushed the feat/add_exchange_rel branch from d50ec60 to f0a4783 Compare July 12, 2023 03:23
@@ -369,6 +369,7 @@ message Rel {
//Physical relations
HashJoinRel hash_join = 13;
MergeJoinRel merge_join = 14;
ExchangeRel exchange = 15;
Copy link
Member

Choose a reason for hiding this comment

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

There are three write relations that should be in a section (they are not physical relations). These are ExchangeRel, DdlRel, and WriteRel. It should look something like:

// Write relations ExchangeRel exchange = 100; DdlRel ddl = 101; WriteRel write = 102;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are three write relations that should be in a section (they are not physical relations). These are ExchangeRel, DdlRel, and WriteRel. It should look something like:

// Write relations ExchangeRel exchange = 100; DdlRel ddl = 101; WriteRel write = 102;

@EpsilonPrime but in https://substrait.io/relations/physical_relations/#exchange-operator , the exchange is classified as a physical relation.

Copy link
Member

Choose a reason for hiding this comment

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

It is indeed listed as a physical relation in the docs so I think this placement is fine. There are arguments to be made that "exchange" is a different sort of physical than "hash_join" (exchange is less about engine-specific optimization and more about distribution) but we'd need a lot more nuance than the docs currently have. Right now I think our working definition of "logical" is "is this something an end-user would put in a query?" and our definition of "physical" is "everything else".

This structure is largely meaningless anyways (as in, it's just a comment and grouping for readability, it makes no difference to the programs themselves since they see this whole list of options as one thing).

Copy link
Member

Choose a reason for hiding this comment

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

Agreed, we can go with this PR as is.

Copy link
Contributor

Choose a reason for hiding this comment

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

LGTM +1

@westonpace westonpace requested a review from EpsilonPrime July 12, 2023 15:38
@westonpace
Copy link
Member

westonpace commented Jul 12, 2023

Since this is a specification modification we will need two SMC votes. @jacques-n @cpcloud can one of you chime in here? It's a one line change so hopefully quick.

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.

5 participants