mbrobbel opened a new pull request #11937:
URL: https://github.com/apache/arrow/pull/11937
Initially I tried to implement this as a `ScalarAggregateFunction` (as
suggested in the issue), however given that there is no way to express
sensitivity to order, it's currently not possible to correctly implement the
`ScalarAggregator::MergeFrom` function. This is now implemented as a
`VectorFunction`.
I'm still working on supporting more types:
- [x] Booleans
- [x] Signed and unsigned integer types
- [ ] Floating point types (I'm trying to figure out what I can re-use)
- [ ] Temporal types
- [ ] Decimal types
I'll create two follow-up JIRA issues to:
- Add support for UTF8 arrays (via lexicographical order):
```
Input: utf8
[
"a",
"b",
"c"
]
Output: struct<increasing:boolean, strictly_decreasing:boolean,
decreasing:boolean, strictly_decreasing:boolean>
{increasing: true, strictly_increasing: true, decreasing: false,
strictly_decreasing: false}
```
- Implement this function for list arrays with well-ordered element types:
```
Input: list<uint8>
[
[1, 2, 3],
[3, 3, 2],
[1, 2, 1, 2]
]
Output list<struct<increasing:boolean, strictly_decreasing:boolean,
decreasing:boolean, strictly_decreasing:boolean>>
[
{increasing: true, strictly_increasing: true, decreasing: false,
strictly_decreasing: false},
{increasing: false, strictly_increasing: false, decreasing: true,
strictly_decreasing: false},
{increasing: false, stirctly_increasing: false, decreasing: false,
strictly_decreasing: false}
]
```
cc @bkietz
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]