[feature-wip](array-type) array_contains support more nested data types (#9170)
Co-authored-by: cambyzju <zhuxiaoli01@baidu.com>
This commit is contained in:
@ -70,6 +70,10 @@ size_t type_index_to_data_type(const std::vector<std::any>& input_types, size_t
|
||||
desc.type = doris_udf::FunctionContext::TYPE_LARGEINT;
|
||||
type = std::make_shared<DataTypeInt128>();
|
||||
return 1;
|
||||
case TypeIndex::Float32:
|
||||
desc.type = doris_udf::FunctionContext::TYPE_FLOAT;
|
||||
type = std::make_shared<DataTypeFloat32>();
|
||||
return 1;
|
||||
case TypeIndex::Float64:
|
||||
desc.type = doris_udf::FunctionContext::TYPE_DOUBLE;
|
||||
type = std::make_shared<DataTypeFloat64>();
|
||||
@ -84,7 +88,7 @@ size_t type_index_to_data_type(const std::vector<std::any>& input_types, size_t
|
||||
return 1;
|
||||
case TypeIndex::Date:
|
||||
desc.type = doris_udf::FunctionContext::TYPE_DATE;
|
||||
type = std::make_shared<DataTypeDateTime>();
|
||||
type = std::make_shared<DataTypeDate>();
|
||||
return 1;
|
||||
case TypeIndex::Array: {
|
||||
desc.type = doris_udf::FunctionContext::TYPE_ARRAY;
|
||||
@ -152,6 +156,9 @@ bool insert_cell(MutableColumnPtr& column, DataTypePtr type_ptr, const std::any&
|
||||
} else if (type.is_int128()) {
|
||||
auto value = std::any_cast<ut_type::LARGEINT>(cell);
|
||||
column->insert_data(reinterpret_cast<char*>(&value), 0);
|
||||
} else if (type.is_float32()) {
|
||||
auto value = std::any_cast<ut_type::FLOAT>(cell);
|
||||
column->insert_data(reinterpret_cast<char*>(&value), 0);
|
||||
} else if (type.is_float64()) {
|
||||
auto value = std::any_cast<ut_type::DOUBLE>(cell);
|
||||
column->insert_data(reinterpret_cast<char*>(&value), 0);
|
||||
|
||||
Reference in New Issue
Block a user