You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[C++][Compute] Prefix-aware BinaryView/StringView execution for equal and not_equal #55801
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.
Activity