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

Extend schema to contain table name, and migrate cost model's ColumnRef property usage to schema #126

Closed
jurplel opened this issue Mar 22, 2024 · 3 comments

Comments

@jurplel
Copy link
Member

jurplel commented Mar 22, 2024

From Chi:

yes we should do that, feel free to create an issue...
this is so-called "column name inference"
assign a name for unnamed columns, and use user-specified names for projections
and for the top-level node, if we have physical property implemented, it will always be a gather node
unless all plan nodes are singleton

ColumnRef and Schema seem to have a lot of purpose overlap, I think that we can merge their functionality together.

@jurplel jurplel changed the title Extend schema to contain table name, and migate cost model's ColumnRef property usage to schema Extend schema to contain table name, and migrate cost model's ColumnRef property usage to schema Mar 23, 2024
@jurplel
Copy link
Member Author

jurplel commented Oct 29, 2024

After reading more into ColumnRef, I am not as sure that it is redundant... Seems like a lot going on

@skyzh
Copy link
Member

skyzh commented Oct 29, 2024

yes, they are all column-level properties; but they are different -- schema is more focused on column type + name, while column ref indicates how the column is computed (which will then be used by the cost model to derive the cost)

@skyzh
Copy link
Member

skyzh commented Oct 29, 2024

with #202, I feel the final state of this property will be like:

  • after aggregation: we will get something like Distinct(ColumnRef)
  • after projection, i.e., select v1 + 1 from table: we will get something like Add(v1, 1)
  • after join, we will get something like Correlated(X, Y, original_column_ref)

so it could be more complex that what it is right now

@jurplel jurplel closed this as completed Oct 30, 2024
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

2 participants