Awesome06 opened a new issue, #55801: URL: https://github.com/apache/arrow/issues/55801
### Describe the enhancement requested ### Summary `ArrayIterator<Type, enable_if_binary_view_like<Type>>` in `codegen_internal.h` unconditionally calls `util::FromBinaryView` per element before invoking `Op::Call`. For `equal` and `not_equal` on `BinaryView` / `StringView` (including mixed `BinaryView` vs `BaseBinary` / `LargeBinary` kernels from #55171), this dereferences out-of-line variadic buffers on every row even when the 16-byte descriptor (`size` and 4-byte inline `prefix`) mismatches. ### Proposal Add an opt-in `CallView` path at the applicator layer while leaving `GetViewType<BinaryViewType>::T = std::string_view` and existing `Op::Call` kernels untouched: - **`binary_view_util.h`:** Add `BinaryViewAccessor` (lazy descriptor access), `PinnedBinaryScalar` (hoists scalar length, 4-byte `prefix`, `size_and_prefix`, `inlined` bytes, and `INT32_MAX` range check outside the loop), `EqualBinaryViewString`, and `EqualBinaryViewValue` overloads guarded by `IsBinaryViewOperand`. - **`codegen_internal.h`:** Add `ViewDescriptorIterator`, `ViewScalarUnboxer`, and C++20 `CallView` dispatch in `ScalarUnary`, `ScalarUnaryNotNullStateful`, `ScalarBinary`, and `ScalarBinaryNotNullStateful`. - **`scalar_compare.cc`:** Opt `Equal` and `NotEqual` into `CallView` via `util::EqualBinaryViewValue`. Follow-up kernels (ordering comparisons, string matching, set lookup, sort/aggregates) will be tracked separately. ### Component(s) C++ -- 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]
