mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-22 01:30:51 +00:00
Revert change, fix injectiveness
This commit is contained in:
parent
e49930fde3
commit
6816e8c5aa
@ -29,6 +29,11 @@ public:
|
||||
return name;
|
||||
}
|
||||
|
||||
bool isInjective(const ColumnsWithTypeAndName & /*sample_columns*/) const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool useDefaultImplementationForLowCardinalityColumns() const override { return false; }
|
||||
|
||||
size_t getNumberOfArguments() const override
|
||||
|
@ -219,9 +219,6 @@ const ActionsDAG::Node & ActionsDAG::addFunction(
|
||||
column = node.function_base->getConstantResultForNonConstArguments(arguments, node.result_type);
|
||||
}
|
||||
|
||||
if (all_const && column && !isColumnConst(*column) && column->size() == 1)
|
||||
column = ColumnConst::create(std::move(column), 1);
|
||||
|
||||
/// If the result is not a constant, just in case, we will consider the result as unknown.
|
||||
if (column && isColumnConst(*column))
|
||||
{
|
||||
|
@ -1,6 +1,2 @@
|
||||
1 0
|
||||
1 0
|
||||
1 0
|
||||
1 0
|
||||
1 1 0
|
||||
0 0 0
|
||||
|
@ -1,8 +1,2 @@
|
||||
SELECT 1 as a, count() FROM numbers(10) WHERE 0 GROUP BY a;
|
||||
|
||||
SELECT materialize(1) as a, count() FROM numbers(10) WHERE 0 GROUP BY a;
|
||||
SELECT materialize(1) as a, count() FROM numbers(10) WHERE 0 ORDER BY a;
|
||||
|
||||
SELECT isConstant(1) as a, count() FROM numbers(10) WHERE 0 GROUP BY a;
|
||||
SELECT 1 as b, isConstant(b) as a, count() FROM numbers(10) WHERE 0 GROUP BY a;
|
||||
SELECT 0 as b, least(isConstant(materialize(1)), b) as a, count() FROM numbers(10) WHERE 0 GROUP BY a;
|
||||
|
Loading…
Reference in New Issue
Block a user