Skip to content

array_sort and array_reverse #6808

@javier

Description

@javier

Is your feature request related to a problem?

add functions to

  • sort an array (as in postgres, sort by natural order, accept a boolean for reverse sort, another for null values positioning)
  • reverse an array, which would be equivalent to array_sort with the reverse flag for sorted arrays, but since that wouldn't work for unsorted arrays, the reverse would just reverse the values. This is interesting for example if you have a list of values that are sorted by timestamp not by value, and you want to reverse the timestamp order

Describe the solution you'd like.

No response

Describe alternatives you've considered.

No response

Full Name:

javier

Affiliation:

questdb

Additional context

No response

Metadata

Metadata

Assignees

Labels

New featureFeature requestsSQLIssues or changes relating to SQL execution

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions