mapleFU opened a new issue, #55399:
URL: https://github.com/apache/arrow/issues/55399
### Describe the enhancement requested
A countIf16 can be introduced here, since when adding levels, this avoids
overflow and nice to optimized.
```c++
template <typename Pred>
inline int64_t CountIf16(const int16_t* p, int64_t n, Pred pred) {
int64_t total = 0;
while (n > 0) {
const int64_t len = std::min<int64_t>(n, 0xFFFF);
uint16_t c = 0;
for (int64_t i = 0; i < len; ++i) c += pred(p[i]) ? 1 : 0;
total += c;
p += len;
n -= len;
}
return total;
}
```
### Component(s)
C++, Parquet
--
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]