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

Question about ReferenceRel #476

Closed
eedalong opened this issue Mar 21, 2023 · 3 comments
Closed

Question about ReferenceRel #476

eedalong opened this issue Mar 21, 2023 · 3 comments

Comments

@eedalong
Copy link

Hi guys, I am really confused about this ReferenceRel.

  1. It is defined in AggregateFunction?
    image

  2. How we suppose to decide the subtree_ordinal for one operator to make it referencable by other Rels?

@westonpace
Copy link
Member

The ReferenceRel message, as it is currently implemented, is incomplete and ambiguous. There was an attempt to clarify things in #288 but that did not merge. However, there is still some good discussion and I recommend you check it out.

Someone should either finish what #288 started or they should remove ReferenceRel. I believe this has been low priority since no one is using it or has needed it yet.

@westonpace
Copy link
Member

I will attempt to answer your questions:

It is defined in AggregateFunction?

Yes, that is wrong. It should be a top-level message in algebra.proto.

How we suppose to decide the subtree_ordinal for one operator to make it referencable by other Rels?

The subtree_ordinal here is an index into Plan::relations:

message Plan {
  ...
  // one or more relation trees that are associated with this plan.
  repeated PlanRel relations = 3;

So if the subtree_ordinal is 2 then it is the third item in Plan::relations.

@jacques-n
Copy link
Contributor

ReferenceRel is now complete and available for use.

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

No branches or pull requests

3 participants