From e9b124b4bcced6ebc5a7a77aa54aca2ddb48db15 Mon Sep 17 00:00:00 2001 From: Arthur Passos Date: Tue, 2 Aug 2022 09:17:53 -0300 Subject: [PATCH] Don't use default implementation for LC columns in Scalar functions --- src/Functions/IFunction.cpp | 2 -- src/Functions/getScalar.cpp | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Functions/IFunction.cpp b/src/Functions/IFunction.cpp index 4e73f7588c5..5be2ea3c5e3 100644 --- a/src/Functions/IFunction.cpp +++ b/src/Functions/IFunction.cpp @@ -285,8 +285,6 @@ ColumnPtr IExecutableFunction::executeWithoutSparseColumns(const ColumnsWithType ? res->cloneResized(1)->convertToFullColumnIfConst() : res; - keys = keys->convertToFullColumnIfLowCardinality(); - auto res_mut_dictionary = DataTypeLowCardinality::createColumnUnique(*res_low_cardinality_type->getDictionaryType()); ColumnPtr res_indexes = res_mut_dictionary->uniqueInsertRangeFrom(*keys, 0, keys->size()); ColumnUniquePtr res_dictionary = std::move(res_mut_dictionary); diff --git a/src/Functions/getScalar.cpp b/src/Functions/getScalar.cpp index c165ef26ffa..aeb68c3825e 100644 --- a/src/Functions/getScalar.cpp +++ b/src/Functions/getScalar.cpp @@ -42,6 +42,11 @@ public: return 1; } + bool useDefaultImplementationForLowCardinalityColumns() const override + { + return false; + } + bool isSuitableForShortCircuitArgumentsExecution(const DataTypesWithConstInfo & /*arguments*/) const override { return false; } DataTypePtr getReturnTypeImpl(const ColumnsWithTypeAndName & arguments) const override