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

Feature: Support map lambda functions #16639

Closed
b41sh opened this issue Oct 18, 2024 · 1 comment · Fixed by #16683
Closed

Feature: Support map lambda functions #16639

b41sh opened this issue Oct 18, 2024 · 1 comment · Fixed by #16683
Assignees
Labels
C-feature Category: feature

Comments

@b41sh
Copy link
Member

b41sh commented Oct 18, 2024

Summary

  • map_filter(map, lambda_expr)
  • map_transform_keys(map, lambda_expr)
  • map_transform_values(map, lambda_expr)

for example:

SELECT map_filter({1:0,2:2,3:-1}, (k, v) -> k > v);
SELECT map_transform_keys({1:1,2:2,3:3}, (k, v) -> k + 1);
SELECT map_transform_values({1:1,2:2,3:3}, (k, v) -> k + v);

reference document:
https://docs.databricks.com/en/sql/language-manual/functions/map_filter.html
https://docs.databricks.com/en/sql/language-manual/functions/transform_keys.html
https://docs.databricks.com/en/sql/language-manual/functions/transform_values.html

@b41sh b41sh added the C-feature Category: feature label Oct 18, 2024
@Dragonliu2018
Copy link
Contributor

i want to try it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category: feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants