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

[BSE-4155] Add support for the Project relational node #37

Merged
merged 45 commits into from
Nov 14, 2024

Conversation

njriasan
Copy link
Contributor

@njriasan njriasan commented Nov 9, 2024

Adds support for the basic definition of the Project relational node.

Copy link
Contributor

@knassre-bodo knassre-bodo left a comment

Choose a reason for hiding this comment

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

I'm increasingly opposed to the use of .ordering and think it is a slippery slope towards making our lives hell in this IR form, and it gives us no real benefit.

Copy link
Contributor

@knassre-bodo knassre-bodo left a comment

Choose a reason for hiding this comment

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

A bunch of nitpicks but LGTM.

from being generated.
"""

def __init__(self, value: Any, data_type: PyDoughType):
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be Any or object?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are equivalent. Everything inherits from object in Python. Personally I prefer Any.

Comment on lines +32 to +34
def __hash__(self) -> int:
# Note: This will break if the value isn't hashable.
return hash((self.value, self.data_type))
Copy link
Contributor

Choose a reason for hiding this comment

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

See my point in the Scan PR about hashing; would the string representation be sufficient?

Base automatically changed from nick/relational_scan to main November 14, 2024 18:04
An error occurred while trying to automatically change base from nick/relational_scan to main November 14, 2024 18:04
@njriasan njriasan merged commit 6fd40c3 into main Nov 14, 2024
4 checks passed
@njriasan njriasan deleted the nick/projection branch November 14, 2024 19:32
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.

2 participants