Skip to content

Commit

Permalink
Fix remaining unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wesm committed Jul 29, 2022
1 parent c6d8411 commit b0d5cdc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions cpp/src/arrow/compute/kernel_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,11 @@ TEST(InputType, Equals) {
ASSERT_NE(InputType(int8()), InputType(Type::INT32));

// Check that field metadata excluded from equality checks
InputType t9 = list(
auto ty9 = list(
field("item", utf8(), /*nullable=*/true, key_value_metadata({"foo"}, {"bar"})));
InputType t10 = list(field("item", utf8()));
auto ty10 = list(field("item", utf8()));
InputType t9 = ty9.get();
InputType t10 = ty10.get();
ASSERT_TRUE(t9.Equals(t10));
}

Expand Down
4 changes: 3 additions & 1 deletion cpp/src/arrow/compute/kernels/aggregate_basic_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,9 @@ struct SumLikeInit {
}

Status Visit(const BooleanType&) {
state.reset(new KernelClass<BooleanType>(boolean().get(), options));
const DataType* ty =
TypeTraits<typename KernelClass<BooleanType>::SumType>::type_singleton().get();
state.reset(new KernelClass<BooleanType>(ty, options));
return Status::OK();
}

Expand Down
2 changes: 1 addition & 1 deletion cpp/src/arrow/compute/kernels/hash_aggregate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2802,7 +2802,7 @@ void PopulateNumericHashKernels(Result<HashAggregateKernel> make_kernel(const Da
AddHashAggKernels({null().get(), boolean().get()}, make_kernel, func.get()));
}
// Type parameters are ignored
DCHECK_OK(AddHashAggKernels(decimal_types, GroupedTDigestFactory::Make, func.get()));
DCHECK_OK(AddHashAggKernels(decimal_types, make_kernel, func.get()));
DCHECK_OK(registry->AddFunction(std::move(func)));
}

Expand Down

0 comments on commit b0d5cdc

Please sign in to comment.