-
Notifications
You must be signed in to change notification settings - Fork 158
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 string_agg aggregate function #297
Conversation
extensions/functions_string.yaml
Outdated
- value: "varchar<L2>" | ||
name: "separator" | ||
description: "Separator for concatenated strings" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this should be marked as needing to be constant (constant: true
IIRC), otherwise someone could pass something that varies from record to record, which makes little sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it in the spec? I cannot find the definition for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes,
Constant: Whether this argument is required to be a constant for invocation. For example, in some system a regular expression pattern would only be accepted as a literal and not a column value reference.
https://substrait.io/expressions/scalar_functions/#value-argument-properties
That being said... it does appear to be missing from the schema. Huh. #305
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depends on #305 for constant separator argument.
- value: "string" | ||
name: "separator" | ||
description: "Separator for concatenated strings" | ||
return: "string" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit, and not sure why none of the linters are complaining about this, but there should probably be a newline at the end of the file.
I think this function needs to be updated to declare that it is ordered per property here: |
@jacques-n I am looking into this ... |
Sorry, forgot to link here; #312 |
This PR includes the addition of
string_agg
operator to concatenate string column data with a separator.