Skip to content

feat(functions-nested): add filter and transform aliases for array_filter/array_transform#22588

Closed
ologlogn wants to merge 2 commits into
apache:mainfrom
ologlogn:array-transform-filter-aliases
Closed

feat(functions-nested): add filter and transform aliases for array_filter/array_transform#22588
ologlogn wants to merge 2 commits into
apache:mainfrom
ologlogn:array-transform-filter-aliases

Conversation

@ologlogn
Copy link
Copy Markdown

Which issue does this PR close?

Partially addresses #14509 — adds filter and transform as additional aliases for array_filter and array_transform.

Rationale for this change

Spark uses filter and transform as the primary names for these functions. Adding these aliases improves compatibility and discoverability for users coming from Spark.

What changes are included in this PR?

  • array_filter: adds filter alias (alongside existing list_filter)
  • array_transform: adds transform alias (alongside existing list_transform)
  • SQL logic tests for both new aliases

Are these changes tested?

Yes — array_filter.slt and array_transform.slt each have a test for the new alias.

Are there any user-facing changes?

Yes — filter(array, lambda) and transform(array, lambda) are now available as SQL functions.

…y_filter/array_transform

Mirrors Spark/DuckDB naming conventions.
@github-actions github-actions Bot added sqllogictest SQL Logic Tests (.slt) functions Changes to functions implementation labels May 28, 2026
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 28, 2026
Volatility::Immutable,
),
aliases: vec![String::from("list_filter")],
aliases: vec![String::from("list_filter"), String::from("filter")],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These aliases might be a bit to generic and opinionated for them to be contributed here. I can imagine how this is very likely to collide with something else.

Have you tried just adding this aliases in your own code? registering these UDFs with your custom aliases should be trivial.

@ologlogn
Copy link
Copy Markdown
Author

closing it, because the alises are too general and might conflict. 👍

@ologlogn ologlogn closed this May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation functions Changes to functions implementation sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants