mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Slightly better
This commit is contained in:
parent
435164cfbb
commit
1238456599
@ -98,10 +98,15 @@ static bool extractConstColumns(ColumnRawPtrs & in, UInt8 & res, Func && func)
|
||||
|
||||
for (int i = static_cast<int>(in.size()) - 1; i >= 0; --i)
|
||||
{
|
||||
if (!isColumnConst(*in[i]))
|
||||
UInt8 x;
|
||||
|
||||
if (in[i]->onlyNull())
|
||||
x = func(Null());
|
||||
else if (isColumnConst(*in[i]))
|
||||
x = func((*in[i])[0]);
|
||||
else
|
||||
continue;
|
||||
|
||||
UInt8 x = func((*in[i])[0]);
|
||||
if (has_res)
|
||||
{
|
||||
res = Op::apply(res, x);
|
||||
|
@ -4,3 +4,4 @@
|
||||
1
|
||||
\N
|
||||
1
|
||||
1
|
||||
|
@ -4,3 +4,5 @@ SELECT materialize(NULL) AND 1;
|
||||
SELECT materialize(NULL) OR 1;
|
||||
SELECT arrayJoin([NULL]) AND 1;
|
||||
SELECT arrayJoin([NULL]) OR 1;
|
||||
|
||||
SELECT isConstant(arrayJoin([NULL]) AND 1);
|
||||
|
Loading…
Reference in New Issue
Block a user