fix: Only convert LogicalTypeId to ConcreteDataType in tests (#241)

LogicalTypeId to ConcreteDataType is only allowed in tests, since some
additional info is not stored in LogicalTypeId now. It is just an id, or
kind, not contains full type info.
This commit is contained in:
evenyag
2022-09-09 17:48:59 +08:00
committed by GitHub
parent 0290cdb5d6
commit d52d1eb122
6 changed files with 12 additions and 4 deletions

View File

@@ -168,7 +168,7 @@ impl AggregateFunctionCreator for DiffAccumulatorCreator {
with_match_primitive_type_id!(
input_types[0].logical_type_id(),
|$S| {
Ok(ConcreteDataType::list_datatype(PrimitiveType::<<$S as Primitive>::LargestType>::default().logical_type_id().data_type()))
Ok(ConcreteDataType::list_datatype(PrimitiveType::<<$S as Primitive>::LargestType>::default().into()))
},
{
unreachable!()
@@ -182,7 +182,7 @@ impl AggregateFunctionCreator for DiffAccumulatorCreator {
with_match_primitive_type_id!(
input_types[0].logical_type_id(),
|$S| {
Ok(vec![ConcreteDataType::list_datatype(PrimitiveType::<$S>::default().logical_type_id().data_type())])
Ok(vec![ConcreteDataType::list_datatype(PrimitiveType::<$S>::default().into())])
},
{
unreachable!()

View File

@@ -237,7 +237,7 @@ impl AggregateFunctionCreator for PolyvalAccumulatorCreator {
with_match_primitive_type_id!(
input_type,
|$S| {
Ok(PrimitiveType::<<$S as Primitive>::LargestType>::default().logical_type_id().data_type())
Ok(PrimitiveType::<<$S as Primitive>::LargestType>::default().into())
},
{
unreachable!()