This commit is contained in:
Nikita Mikhailov 2021-01-21 17:14:42 +03:00 committed by Nikita Mikhaylov
parent 6a51ad425e
commit 79b76d428f
2 changed files with 3 additions and 3 deletions

View File

@ -66,7 +66,7 @@ Parser makeParser(const ColumnWithTypeAndName & col)
{
throw Exception("Failed to cast " + col.type->getName() + " to " + wanted_data_type->getName(), ErrorCodes::ILLEGAL_COLUMN);
}
return Parser(std::move(casted));
return Parser(std::move(casted->convertToFullColumnIfConst()));
}
}

View File

@ -69,10 +69,10 @@ public:
#ifndef NDEBUG
size = tuple.size();
#endif
const auto & x_data = static_cast<const ColumnFloat64 &>(*tuple_columns[0]);
const auto & x_data = dynamic_cast<const ColumnFloat64 &>(*tuple_columns[0]);
first = x_data.getData().data();
const auto & y_data = static_cast<const ColumnFloat64 &>(*tuple_columns[1]);
const auto & y_data = dynamic_cast<const ColumnFloat64 &>(*tuple_columns[1]);
second = y_data.getData().data();
}