Skip to content

feat: add builders for aggregate, window funcs and if-then #72

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 2 commits into from
Apr 16, 2025

Conversation

tokoko
Copy link
Contributor

@tokoko tokoko commented Apr 12, 2025

  • moves builders to a new directory
  • renames FunctionRegistry to ExtensionRegistry
  • adds new extended expression builders

Copy link
Member

Choose a reason for hiding this comment

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

I think this file was deprecated in Python 3.3.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done. I still bump into issues occasionally when init files are missing, but we can always add them if there's a need for it later

output_type=func[1],
)
),
output_names=[alias if alias else "scalar_function"],
Copy link
Member

Choose a reason for hiding this comment

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

Should this be a unique name? Perhaps keep track of generated names and prepend a count for each reuse (and elsewhere).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I switched to a rudimentary way of generating names from argument names. (ibis does something like this) Pretty sure it's gonna fail if the output type of an expression contains a struct, but it's a start. I'm not sure if it's worth it to infer an output type just to get the expected cardinality of the output_names array.

@EpsilonPrime EpsilonPrime merged commit 4aae404 into substrait-io:main Apr 16, 2025
17 checks passed
@tokoko tokoko deleted the ee-builders branch April 16, 2025 17:53
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