remove properly

This commit is contained in:
zvonand 2023-08-25 16:49:23 +05:00
parent 978a1765df
commit 0a81794a26

View File

@ -3,12 +3,10 @@
#include <Functions/FunctionHelpers.h> #include <Functions/FunctionHelpers.h>
#include <DataTypes/DataTypeTuple.h> #include <DataTypes/DataTypeTuple.h>
#include <DataTypes/DataTypesNumber.h> #include <DataTypes/DataTypesNumber.h>
//#include <DataTypes/DataTypeLowCardinality.h>
#include <Columns/ColumnConst.h> #include <Columns/ColumnConst.h>
#include <Columns/ColumnsNumber.h> #include <Columns/ColumnsNumber.h>
#include <Columns/ColumnTuple.h> #include <Columns/ColumnTuple.h>
#include <Columns/ColumnSet.h> #include <Columns/ColumnSet.h>
//#include <Columns/ColumnLowCardinality.h>
#include <Interpreters/Set.h> #include <Interpreters/Set.h>
@ -70,14 +68,6 @@ public:
return 2; return 2;
} }
/// Do not use default implementation for LowCardinality.
/// For now, Set may be const or non const column, depending on how it was created.
/// But we will return UInt8 for any case.
/// TODO: we could use special implementation later.
// bool useDefaultImplementationForLowCardinalityColumns() const override { return false; }
// bool canBeExecutedOnLowCardinalityDictionary() const override { return false; }
DataTypePtr getReturnTypeImpl(const DataTypes & /*arguments*/) const override DataTypePtr getReturnTypeImpl(const DataTypes & /*arguments*/) const override
{ {
return std::make_shared<DataTypeUInt8>(); return std::make_shared<DataTypeUInt8>();
@ -145,8 +135,6 @@ public:
else else
columns_of_key_columns.emplace_back(left_arg); columns_of_key_columns.emplace_back(left_arg);
/// Replace single LowCardinality column to it's dictionary if possible.
// ColumnPtr lc_indexes = nullptr;
bool is_const = false; bool is_const = false;
if (columns_of_key_columns.size() == 1) if (columns_of_key_columns.size() == 1)
{ {
@ -157,20 +145,10 @@ public:
col = &const_col->getDataColumn(); col = &const_col->getDataColumn();
is_const = true; is_const = true;
} }
// if (const auto * lc = typeid_cast<const ColumnLowCardinality *>(col))
// {
// lc_indexes = lc->getIndexesPtr();
// arg.column = lc->getDictionary().getNestedColumn();
// arg.type = removeLowCardinality(arg.type);
// }
} }
auto res = set->execute(columns_of_key_columns, negative); auto res = set->execute(columns_of_key_columns, negative);
// if (lc_indexes)
// res = res->index(*lc_indexes, 0);
if (is_const) if (is_const)
res = ColumnUInt8::create(input_rows_count, res->getUInt(0)); res = ColumnUInt8::create(input_rows_count, res->getUInt(0));