Update h3ToGeoBoundary.cpp

This commit is contained in:
alexey-milovidov 2021-09-16 00:24:12 +03:00 committed by GitHub
parent b467df98d3
commit 10a314dd46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,7 +38,8 @@ public:
DataTypePtr getReturnTypeImpl(const DataTypes & arguments) const override DataTypePtr getReturnTypeImpl(const DataTypes & arguments) const override
{ {
const auto & arg = arguments[0]; const auto & arg = arguments[0];
if(!isUInt64(arg)) { if (!isUInt64(arg))
{
throw Exception( throw Exception(
ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT,
"Illegal type {} of argument {} of function {}. Must be UInt64", "Illegal type {} of argument {} of function {}. Must be UInt64",
@ -47,9 +48,7 @@ public:
return std::make_shared<DataTypeArray>( return std::make_shared<DataTypeArray>(
std::make_shared<DataTypeTuple>( std::make_shared<DataTypeTuple>(
DataTypes{std::make_shared<DataTypeFloat64>(), std::make_shared<DataTypeFloat64>()} DataTypes{std::make_shared<DataTypeFloat64>(), std::make_shared<DataTypeFloat64>()}));
)
);
} }
ColumnPtr executeImpl(const ColumnsWithTypeAndName & arguments, const DataTypePtr &, size_t input_rows_count) const override ColumnPtr executeImpl(const ColumnsWithTypeAndName & arguments, const DataTypePtr &, size_t input_rows_count) const override
@ -83,8 +82,7 @@ public:
return ColumnArray::create( return ColumnArray::create(
ColumnTuple::create(Columns{std::move(latitude), std::move(longitude)}), ColumnTuple::create(Columns{std::move(latitude), std::move(longitude)}),
std::move(offsets) std::move(offsets));
);
} }
}; };
@ -93,7 +91,6 @@ void registerFunctionH3ToGeoBoundary(FunctionFactory & factory)
factory.registerFunction<FunctionH3ToGeoBoundary>(); factory.registerFunction<FunctionH3ToGeoBoundary>();
} }
} }
#endif #endif