mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
fix s2 functions having const columns
This commit is contained in:
parent
e4d5db6161
commit
b7678c1bc1
@ -67,7 +67,11 @@ public:
|
||||
|
||||
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)
|
||||
throw Exception(
|
||||
ErrorCodes::ILLEGAL_COLUMN,
|
||||
@ -77,7 +81,7 @@ public:
|
||||
getName());
|
||||
const auto & data_col_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)
|
||||
throw Exception(
|
||||
ErrorCodes::ILLEGAL_COLUMN,
|
||||
|
@ -84,7 +84,11 @@ public:
|
||||
|
||||
ColumnPtr executeImpl(const ColumnsWithTypeAndName & arguments, const DataTypePtr &, size_t input_rows_count) const override
|
||||
{
|
||||
const auto * col_center = checkAndGetColumn<ColumnUInt64>(arguments[0].column.get());
|
||||
auto non_const_arguments = arguments;
|
||||
for (auto & argument : non_const_arguments)
|
||||
argument.column = argument.column->convertToFullColumnIfConst();
|
||||
|
||||
const auto * col_center = checkAndGetColumn<ColumnUInt64>(non_const_arguments[0].column.get());
|
||||
if (!col_center)
|
||||
throw Exception(
|
||||
ErrorCodes::ILLEGAL_COLUMN,
|
||||
@ -94,7 +98,7 @@ public:
|
||||
getName());
|
||||
const auto & data_center = col_center->getData();
|
||||
|
||||
const auto * col_degrees = checkAndGetColumn<ColumnFloat64>(arguments[1].column.get());
|
||||
const auto * col_degrees = checkAndGetColumn<ColumnFloat64>(non_const_arguments[1].column.get());
|
||||
if (!col_degrees)
|
||||
throw Exception(
|
||||
ErrorCodes::ILLEGAL_COLUMN,
|
||||
@ -105,7 +109,7 @@ public:
|
||||
const auto & data_degrees = col_degrees->getData();
|
||||
|
||||
|
||||
const auto * col_point = checkAndGetColumn<ColumnUInt64>(arguments[2].column.get());
|
||||
const auto * col_point = checkAndGetColumn<ColumnUInt64>(non_const_arguments[2].column.get());
|
||||
if (!col_point)
|
||||
throw Exception(
|
||||
ErrorCodes::ILLEGAL_COLUMN,
|
||||
|
@ -82,7 +82,11 @@ public:
|
||||
|
||||
ColumnPtr executeImpl(const ColumnsWithTypeAndName & arguments, const DataTypePtr &, size_t input_rows_count) const override
|
||||
{
|
||||
const auto * col_center1 = checkAndGetColumn<ColumnUInt64>(arguments[0].column.get());
|
||||
auto non_const_arguments = arguments;
|
||||
for (auto & argument : non_const_arguments)
|
||||
argument.column = argument.column->convertToFullColumnIfConst();
|
||||
|
||||
const auto * col_center1 = checkAndGetColumn<ColumnUInt64>(non_const_arguments[0].column.get());
|
||||
if (!col_center1)
|
||||
throw Exception(
|
||||
ErrorCodes::ILLEGAL_COLUMN,
|
||||
@ -92,7 +96,7 @@ public:
|
||||
getName());
|
||||
const auto & data_center1 = col_center1->getData();
|
||||
|
||||
const auto * col_radius1 = checkAndGetColumn<ColumnFloat64>(arguments[1].column.get());
|
||||
const auto * col_radius1 = checkAndGetColumn<ColumnFloat64>(non_const_arguments[1].column.get());
|
||||
if (!col_radius1)
|
||||
throw Exception(
|
||||
ErrorCodes::ILLEGAL_COLUMN,
|
||||
@ -102,7 +106,7 @@ public:
|
||||
getName());
|
||||
const auto & data_radius1 = col_radius1->getData();
|
||||
|
||||
const auto * col_center2 = checkAndGetColumn<ColumnUInt64>(arguments[2].column.get());
|
||||
const auto * col_center2 = checkAndGetColumn<ColumnUInt64>(non_const_arguments[2].column.get());
|
||||
if (!col_center2)
|
||||
throw Exception(
|
||||
ErrorCodes::ILLEGAL_COLUMN,
|
||||
@ -112,7 +116,7 @@ public:
|
||||
getName());
|
||||
const auto & data_center2 = col_center2->getData();
|
||||
|
||||
const auto * col_radius2 = checkAndGetColumn<ColumnFloat64>(arguments[3].column.get());
|
||||
const auto * col_radius2 = checkAndGetColumn<ColumnFloat64>(non_const_arguments[3].column.get());
|
||||
if (!col_radius2)
|
||||
throw Exception(
|
||||
ErrorCodes::ILLEGAL_COLUMN,
|
||||
|
@ -66,7 +66,11 @@ public:
|
||||
|
||||
ColumnPtr executeImpl(const ColumnsWithTypeAndName & arguments, const DataTypePtr &, size_t input_rows_count) const override
|
||||
{
|
||||
const auto * col_id_first = checkAndGetColumn<ColumnUInt64>(arguments[0].column.get());
|
||||
auto non_const_arguments = arguments;
|
||||
for (auto & argument : non_const_arguments)
|
||||
argument.column = argument.column->convertToFullColumnIfConst();
|
||||
|
||||
const auto * col_id_first = checkAndGetColumn<ColumnUInt64>(non_const_arguments[0].column.get());
|
||||
if (!col_id_first)
|
||||
throw Exception(
|
||||
ErrorCodes::ILLEGAL_COLUMN,
|
||||
@ -76,7 +80,7 @@ public:
|
||||
getName());
|
||||
const auto & data_id_first = col_id_first->getData();
|
||||
|
||||
const auto * col_id_second = checkAndGetColumn<ColumnUInt64>(arguments[1].column.get());
|
||||
const auto * col_id_second = checkAndGetColumn<ColumnUInt64>(non_const_arguments[1].column.get());
|
||||
if (!col_id_second)
|
||||
throw Exception(
|
||||
ErrorCodes::ILLEGAL_COLUMN,
|
||||
|
@ -67,7 +67,11 @@ public:
|
||||
|
||||
ColumnPtr executeImpl(const ColumnsWithTypeAndName & arguments, const DataTypePtr &, size_t input_rows_count) const override
|
||||
{
|
||||
const auto * col_id = checkAndGetColumn<ColumnUInt64>(arguments[0].column.get());
|
||||
auto non_const_arguments = arguments;
|
||||
for (auto & argument : non_const_arguments)
|
||||
argument.column = argument.column->convertToFullColumnIfConst();
|
||||
|
||||
const auto * col_id = checkAndGetColumn<ColumnUInt64>(non_const_arguments[0].column.get());
|
||||
if (!col_id)
|
||||
throw Exception(
|
||||
ErrorCodes::ILLEGAL_COLUMN,
|
||||
|
@ -65,7 +65,11 @@ public:
|
||||
|
||||
ColumnPtr executeImpl(const ColumnsWithTypeAndName & arguments, const DataTypePtr &, size_t input_rows_count) const override
|
||||
{
|
||||
const auto * col_lo = checkAndGetColumn<ColumnUInt64>(arguments[0].column.get());
|
||||
auto non_const_arguments = arguments;
|
||||
for (auto & argument : non_const_arguments)
|
||||
argument.column = argument.column->convertToFullColumnIfConst();
|
||||
|
||||
const auto * col_lo = checkAndGetColumn<ColumnUInt64>(non_const_arguments[0].column.get());
|
||||
if (!col_lo)
|
||||
throw Exception(
|
||||
ErrorCodes::ILLEGAL_COLUMN,
|
||||
@ -75,7 +79,7 @@ public:
|
||||
getName());
|
||||
const auto & data_low = col_lo->getData();
|
||||
|
||||
const auto * col_hi = checkAndGetColumn<ColumnUInt64>(arguments[1].column.get());
|
||||
const auto * col_hi = checkAndGetColumn<ColumnUInt64>(non_const_arguments[1].column.get());
|
||||
if (!col_hi)
|
||||
throw Exception(
|
||||
ErrorCodes::ILLEGAL_COLUMN,
|
||||
@ -85,7 +89,7 @@ public:
|
||||
getName());
|
||||
const auto & data_hi = col_hi->getData();
|
||||
|
||||
const auto * col_point = checkAndGetColumn<ColumnUInt64>(arguments[2].column.get());
|
||||
const auto * col_point = checkAndGetColumn<ColumnUInt64>(non_const_arguments[2].column.get());
|
||||
if (!col_point)
|
||||
throw Exception(
|
||||
ErrorCodes::ILLEGAL_COLUMN,
|
||||
|
@ -63,7 +63,11 @@ public:
|
||||
|
||||
ColumnPtr executeImpl(const ColumnsWithTypeAndName & arguments, const DataTypePtr &, size_t input_rows_count) const override
|
||||
{
|
||||
const auto * col_lo = checkAndGetColumn<ColumnUInt64>(arguments[0].column.get());
|
||||
auto non_const_arguments = arguments;
|
||||
for (auto & argument : non_const_arguments)
|
||||
argument.column = argument.column->convertToFullColumnIfConst();
|
||||
|
||||
const auto * col_lo = checkAndGetColumn<ColumnUInt64>(non_const_arguments[0].column.get());
|
||||
if (!col_lo)
|
||||
throw Exception(
|
||||
ErrorCodes::ILLEGAL_COLUMN,
|
||||
@ -73,7 +77,7 @@ public:
|
||||
getName());
|
||||
const auto & data_low = col_lo->getData();
|
||||
|
||||
const auto * col_hi = checkAndGetColumn<ColumnUInt64>(arguments[1].column.get());
|
||||
const auto * col_hi = checkAndGetColumn<ColumnUInt64>(non_const_arguments[1].column.get());
|
||||
if (!col_hi)
|
||||
throw Exception(
|
||||
ErrorCodes::ILLEGAL_COLUMN,
|
||||
@ -83,7 +87,7 @@ public:
|
||||
getName());
|
||||
const auto & data_hi = col_hi->getData();
|
||||
|
||||
const auto * col_point = checkAndGetColumn<ColumnUInt64>(arguments[2].column.get());
|
||||
const auto * col_point = checkAndGetColumn<ColumnUInt64>(non_const_arguments[2].column.get());
|
||||
if (!col_point)
|
||||
throw Exception(
|
||||
ErrorCodes::ILLEGAL_COLUMN,
|
||||
|
@ -68,7 +68,11 @@ public:
|
||||
|
||||
ColumnPtr executeImpl(const ColumnsWithTypeAndName & arguments, const DataTypePtr &, size_t input_rows_count) const override
|
||||
{
|
||||
const auto * col_lo1 = checkAndGetColumn<ColumnUInt64>(arguments[0].column.get());
|
||||
auto non_const_arguments = arguments;
|
||||
for (auto & argument : non_const_arguments)
|
||||
argument.column = argument.column->convertToFullColumnIfConst();
|
||||
|
||||
const auto * col_lo1 = checkAndGetColumn<ColumnUInt64>(non_const_arguments[0].column.get());
|
||||
if (!col_lo1)
|
||||
throw Exception(
|
||||
ErrorCodes::ILLEGAL_COLUMN,
|
||||
@ -78,7 +82,7 @@ public:
|
||||
getName());
|
||||
const auto & data_lo1 = col_lo1->getData();
|
||||
|
||||
const auto * col_hi1 = checkAndGetColumn<ColumnFloat64>(arguments[1].column.get());
|
||||
const auto * col_hi1 = checkAndGetColumn<ColumnUInt64>(non_const_arguments[1].column.get());
|
||||
if (!col_hi1)
|
||||
throw Exception(
|
||||
ErrorCodes::ILLEGAL_COLUMN,
|
||||
@ -88,7 +92,7 @@ public:
|
||||
getName());
|
||||
const auto & data_hi1 = col_hi1->getData();
|
||||
|
||||
const auto * col_lo2 = checkAndGetColumn<ColumnUInt64>(arguments[2].column.get());
|
||||
const auto * col_lo2 = checkAndGetColumn<ColumnUInt64>(non_const_arguments[2].column.get());
|
||||
if (!col_lo2)
|
||||
throw Exception(
|
||||
ErrorCodes::ILLEGAL_COLUMN,
|
||||
@ -98,7 +102,7 @@ public:
|
||||
getName());
|
||||
const auto & data_lo2 = col_lo2->getData();
|
||||
|
||||
const auto * col_hi2 = checkAndGetColumn<ColumnFloat64>(arguments[3].column.get());
|
||||
const auto * col_hi2 = checkAndGetColumn<ColumnUInt64>(non_const_arguments[3].column.get());
|
||||
if (!col_hi2)
|
||||
throw Exception(
|
||||
ErrorCodes::ILLEGAL_COLUMN,
|
||||
|
@ -66,7 +66,11 @@ public:
|
||||
|
||||
ColumnPtr executeImpl(const ColumnsWithTypeAndName & arguments, const DataTypePtr &, size_t input_rows_count) const override
|
||||
{
|
||||
const auto * col_lo1 = checkAndGetColumn<ColumnUInt64>(arguments[0].column.get());
|
||||
auto non_const_arguments = arguments;
|
||||
for (auto & argument : non_const_arguments)
|
||||
argument.column = argument.column->convertToFullColumnIfConst();
|
||||
|
||||
const auto * col_lo1 = checkAndGetColumn<ColumnUInt64>(non_const_arguments[0].column.get());
|
||||
if (!col_lo1)
|
||||
throw Exception(
|
||||
ErrorCodes::ILLEGAL_COLUMN,
|
||||
@ -76,7 +80,7 @@ public:
|
||||
getName());
|
||||
const auto & data_lo1 = col_lo1->getData();
|
||||
|
||||
const auto * col_hi1 = checkAndGetColumn<ColumnFloat64>(arguments[1].column.get());
|
||||
const auto * col_hi1 = checkAndGetColumn<ColumnUInt64>(non_const_arguments[1].column.get());
|
||||
if (!col_hi1)
|
||||
throw Exception(
|
||||
ErrorCodes::ILLEGAL_COLUMN,
|
||||
@ -86,7 +90,7 @@ public:
|
||||
getName());
|
||||
const auto & data_hi1 = col_hi1->getData();
|
||||
|
||||
const auto * col_lo2 = checkAndGetColumn<ColumnUInt64>(arguments[2].column.get());
|
||||
const auto * col_lo2 = checkAndGetColumn<ColumnUInt64>(non_const_arguments[2].column.get());
|
||||
if (!col_lo2)
|
||||
throw Exception(
|
||||
ErrorCodes::ILLEGAL_COLUMN,
|
||||
@ -96,7 +100,7 @@ public:
|
||||
getName());
|
||||
const auto & data_lo2 = col_lo2->getData();
|
||||
|
||||
const auto * col_hi2 = checkAndGetColumn<ColumnFloat64>(arguments[3].column.get());
|
||||
const auto * col_hi2 = checkAndGetColumn<ColumnUInt64>(non_const_arguments[3].column.get());
|
||||
if (!col_hi2)
|
||||
throw Exception(
|
||||
ErrorCodes::ILLEGAL_COLUMN,
|
||||
|
@ -68,7 +68,11 @@ public:
|
||||
|
||||
ColumnPtr executeImpl(const ColumnsWithTypeAndName & arguments, const DataTypePtr &, size_t input_rows_count) const override
|
||||
{
|
||||
const auto * col_id = checkAndGetColumn<ColumnUInt64>(arguments[0].column.get());
|
||||
auto non_const_arguments = arguments;
|
||||
for (auto & argument : non_const_arguments)
|
||||
argument.column = argument.column->convertToFullColumnIfConst();
|
||||
|
||||
const auto * col_id = checkAndGetColumn<ColumnUInt64>(non_const_arguments[0].column.get());
|
||||
if (!col_id)
|
||||
throw Exception(
|
||||
ErrorCodes::ILLEGAL_COLUMN,
|
||||
|
Loading…
Reference in New Issue
Block a user