mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
Performance tests fix H3
This commit is contained in:
parent
652980eec3
commit
80b0efb367
@ -71,7 +71,11 @@ public:
|
|||||||
|
|
||||||
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
|
||||||
{
|
{
|
||||||
const auto * col_lon = checkAndGetColumn<ColumnFloat64>(arguments[0].column.get());
|
auto non_const_arguments = arguments;
|
||||||
|
for (auto & argument : non_const_arguments)
|
||||||
|
argument.column = argument.column->convertToFullColumnIfConst();
|
||||||
|
|
||||||
|
const auto * col_lon = checkAndGetColumn<ColumnFloat64>(non_const_arguments[0].column.get());
|
||||||
if (!col_lon)
|
if (!col_lon)
|
||||||
throw Exception(
|
throw Exception(
|
||||||
ErrorCodes::ILLEGAL_COLUMN,
|
ErrorCodes::ILLEGAL_COLUMN,
|
||||||
@ -81,7 +85,7 @@ public:
|
|||||||
getName());
|
getName());
|
||||||
const auto & data_lon = col_lon->getData();
|
const auto & data_lon = col_lon->getData();
|
||||||
|
|
||||||
const auto * col_lat = checkAndGetColumn<ColumnFloat64>(arguments[1].column.get());
|
const auto * col_lat = checkAndGetColumn<ColumnFloat64>(non_const_arguments[1].column.get());
|
||||||
if (!col_lat)
|
if (!col_lat)
|
||||||
throw Exception(
|
throw Exception(
|
||||||
ErrorCodes::ILLEGAL_COLUMN,
|
ErrorCodes::ILLEGAL_COLUMN,
|
||||||
@ -91,7 +95,7 @@ public:
|
|||||||
getName());
|
getName());
|
||||||
const auto & data_lat = col_lat->getData();
|
const auto & data_lat = col_lat->getData();
|
||||||
|
|
||||||
const auto * col_res = checkAndGetColumn<ColumnUInt8>(arguments[2].column.get());
|
const auto * col_res = checkAndGetColumn<ColumnUInt8>(non_const_arguments[2].column.get());
|
||||||
if (!col_res)
|
if (!col_res)
|
||||||
throw Exception(
|
throw Exception(
|
||||||
ErrorCodes::ILLEGAL_COLUMN,
|
ErrorCodes::ILLEGAL_COLUMN,
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
<test>
|
<test>
|
||||||
|
|
||||||
|
|
||||||
<!-- Moscow coordinates, maximum precision. NOTE: H3 library is extraordinary slow. -->
|
<!-- Moscow coordinates, maximum precision. NOTE: H3 library is extraordinary slow. -->
|
||||||
<query>SELECT count() FROM zeros(100000) WHERE NOT ignore(geoToH3(37.62 + rand(1) / 0x100000000, 55.75 + rand(2) / 0x100000000, 15))</query>
|
<query>SELECT count() FROM zeros(100000) WHERE NOT ignore(geoToH3(37.62 + rand(1) / 0x100000000, 55.75 + rand(2) / 0x100000000, toUInt8(15)))</query>
|
||||||
</test>
|
</test>
|
||||||
|
Loading…
Reference in New Issue
Block a user