[Chore](primitive-type) remove VecPrimitiveTypeTraits (#22842)
This commit is contained in:
@ -20,7 +20,6 @@
|
||||
|
||||
#include "common/status.h"
|
||||
#include "function_test_util.h"
|
||||
#include "gtest/gtest_pred_impl.h"
|
||||
#include "testutil/any_type.h"
|
||||
#include "vec/core/field.h"
|
||||
#include "vec/core/types.h"
|
||||
@ -46,11 +45,11 @@ TEST(function_array_index_test, array_contains) {
|
||||
check_function<DataTypeUInt8, true>(func_name, input_types, data_set);
|
||||
}
|
||||
|
||||
// array_contains(Array<Int32>, Int8)
|
||||
// array_contains(Array<Int8>, Int8)
|
||||
{
|
||||
InputTypeSet input_types = {TypeIndex::Array, TypeIndex::Int32, TypeIndex::Int8};
|
||||
InputTypeSet input_types = {TypeIndex::Array, TypeIndex::Int8, TypeIndex::Int8};
|
||||
|
||||
Array vec = {Int32(1), Int32(2), Int32(3)};
|
||||
Array vec = {Int8(1), Int8(2), Int8(3)};
|
||||
DataSet data_set = {{{vec, Int8(2)}, UInt8(1)},
|
||||
{{vec, Int8(4)}, UInt8(0)},
|
||||
{{Null(), Int8(1)}, Null()},
|
||||
@ -59,11 +58,11 @@ TEST(function_array_index_test, array_contains) {
|
||||
check_function<DataTypeUInt8, true>(func_name, input_types, data_set);
|
||||
}
|
||||
|
||||
// array_contains(Array<Int8>, Int64)
|
||||
// array_contains(Array<Int64>, Int64)
|
||||
{
|
||||
InputTypeSet input_types = {TypeIndex::Array, TypeIndex::Int8, TypeIndex::Int64};
|
||||
InputTypeSet input_types = {TypeIndex::Array, TypeIndex::Int64, TypeIndex::Int64};
|
||||
|
||||
Array vec = {Int8(1), Int8(2), Int8(3)};
|
||||
Array vec = {Int64(1), Int64(2), Int64(3)};
|
||||
DataSet data_set = {{{vec, Int64(2)}, UInt8(1)},
|
||||
{{vec, Int64(4)}, UInt8(0)},
|
||||
{{Null(), Int64(1)}, Null()},
|
||||
@ -187,28 +186,28 @@ TEST(function_array_index_test, array_position) {
|
||||
check_function<DataTypeInt64, true>(func_name, input_types, data_set);
|
||||
}
|
||||
|
||||
// array_position(Array<Int32>, Int8)
|
||||
// array_position(Array<Int32>, Int32)
|
||||
{
|
||||
InputTypeSet input_types = {TypeIndex::Array, TypeIndex::Int32, TypeIndex::Int8};
|
||||
InputTypeSet input_types = {TypeIndex::Array, TypeIndex::Int32, TypeIndex::Int32};
|
||||
|
||||
Array vec = {Int32(1), Int32(2), Int32(3)};
|
||||
DataSet data_set = {{{vec, Int8(2)}, Int64(2)},
|
||||
{{vec, Int8(4)}, Int64(0)},
|
||||
{{Null(), Int8(1)}, Null()},
|
||||
{{empty_arr, Int8(1)}, Int64(0)}};
|
||||
DataSet data_set = {{{vec, Int32(2)}, Int64(2)},
|
||||
{{vec, Int32(4)}, Int64(0)},
|
||||
{{Null(), Int32(1)}, Null()},
|
||||
{{empty_arr, Int32(1)}, Int64(0)}};
|
||||
|
||||
check_function<DataTypeInt64, true>(func_name, input_types, data_set);
|
||||
}
|
||||
|
||||
// array_position(Array<Int8>, Int64)
|
||||
// array_position(Array<Int8>, Int8)
|
||||
{
|
||||
InputTypeSet input_types = {TypeIndex::Array, TypeIndex::Int8, TypeIndex::Int64};
|
||||
InputTypeSet input_types = {TypeIndex::Array, TypeIndex::Int8, TypeIndex::Int8};
|
||||
|
||||
Array vec = {Int8(1), Int8(2), Int8(3)};
|
||||
DataSet data_set = {{{vec, Int64(2)}, Int64(2)},
|
||||
{{vec, Int64(4)}, Int64(0)},
|
||||
{{Null(), Int64(1)}, Null()},
|
||||
{{empty_arr, Int64(1)}, Int64(0)}};
|
||||
DataSet data_set = {{{vec, Int8(2)}, Int64(2)},
|
||||
{{vec, Int8(4)}, Int64(0)},
|
||||
{{Null(), Int8(1)}, Null()},
|
||||
{{empty_arr, Int8(1)}, Int64(0)}};
|
||||
|
||||
check_function<DataTypeInt64, true>(func_name, input_types, data_set);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user