zeroshade commented on code in PR #716:
URL: https://github.com/apache/arrow-go/pull/716#discussion_r3351094364
##########
arrow/compute/vector_selection_test.go:
##########
@@ -1826,6 +1851,7 @@ func TestFilterKernels(t *testing.T) {
for _, dt := range baseBinaryTypes {
suite.Run(t, &FilterKernelWithString{dt: dt})
}
+ suite.Run(t, &FilterKernelWithString{dt:
&arrow.DictionaryType{IndexType: arrow.PrimitiveTypes.Int8, ValueType:
arrow.BinaryTypes.String}})
Review Comment:
Can we add tests for a few more combinations of different index/value types?
Perhaps add a numeric dict test or a complex type like list/struct? Just to add
more type coverage to the tests for this.
##########
arrow/compute/selection.go:
##########
@@ -485,6 +485,40 @@ func structFilter(ctx *exec.KernelCtx, batch
*exec.ExecSpan, out *exec.ExecResul
return nil
}
+
+// dictionaryFilter is a special case for filtering a dictionary array
+//
+// The implementation uses the 'dictionaryTake' implementation.
+func dictionaryFilter(ctx *exec.KernelCtx, batch *exec.ExecSpan, out
*exec.ExecResult) error {
Review Comment:
Possible improvement, you could update this to mirror the
`extensionFilterImpl` and just filter the indices array directly and then
rewrap as a dictionary instead of doing bool->indices->Take.
It's a nitpick to eliminate a bit of overhead, but could also be done as a
follow-up improvement. Not critical.
--
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]