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

[EPIC] Add support for all array expressions #1042

Open
1 of 20 tasks
Tracked by #1043
andygrove opened this issue Oct 30, 2024 · 0 comments
Open
1 of 20 tasks
Tracked by #1043

[EPIC] Add support for all array expressions #1042

andygrove opened this issue Oct 30, 2024 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@andygrove
Copy link
Member

andygrove commented Oct 30, 2024

What is the problem the feature request solves?

We would like to support all array operations natively in Comet.

  • array: SELECT array(1, 2, 3)
  • array_agg: SELECT array_agg(col) FROM VALUES (1), (2), (1) AS tab(col)
  • array_append: SELECT array_append(array('b', 'd', 'c', 'a'), 'd')
  • array_compact: SELECT array_compact(array(1, 2, 3, null))
  • array_contains: SELECT array_contains(array(1, 2, 3), 2)
  • array_distinct: SELECT array_distinct(array(1, 2, 3, null, 3))
  • array_except: SELECT array_except(array(1, 2, 3), array(1, 3, 5))
  • array_insert: SELECT array_insert(array(1, 2, 3, 4), 5, 5)
  • array_intersect: SELECT array_intersect(array(1, 2, 3), array(1, 3, 5))
  • array_join: SELECT array_join(array('hello', 'world'), ' ')
  • array_max: SELECT array_max(array(1, 20, null, 3))
  • array_min: SELECT array_min(array(1, 20, null, 3))
  • array_position: SELECT array_position(array(3, 2, 1), 1)
  • array_remove: SELECT array_remove(array(1, 2, 3, null, 3), 3)
  • array_repeat: SELECT array_repeat('123', 2)
  • array_size: SELECT array_size(array('b', 'd', 'c', 'a'))
  • array_sort: SELECT array_sort(array(5, 6, 1), (left, right) -> case when left < right then -1 when left > right then 1 else 0 end)
  • array_union: SELECT array_union(array(1, 2, 3), array(1, 3, 5))
  • arrays_overlap: SELECT arrays_overlap(array(1, 2, 3), array(3, 4, 5))
  • arrays_zip: SELECT arrays_zip(array(1, 2, 3), array(2, 3, 4))

Describe the potential solution

No response

Additional context

No response

@andygrove andygrove added the enhancement New feature or request label Oct 30, 2024
@viirya viirya added the help wanted Extra attention is needed label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants