mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Fix fuzz test
This commit is contained in:
parent
e9b5687e68
commit
435164cfbb
@ -199,12 +199,20 @@ struct ValueGetterBuilderImpl<Type, Types...>
|
||||
{
|
||||
static TernaryValueGetter build(const IColumn * x)
|
||||
{
|
||||
if (const auto * nullable_column = typeid_cast<const ColumnNullable *>(x))
|
||||
if (x->onlyNull())
|
||||
{
|
||||
return [](size_t){ return Ternary::Null; };
|
||||
}
|
||||
else if (const auto * nullable_column = typeid_cast<const ColumnNullable *>(x))
|
||||
{
|
||||
if (const auto * nested_column = typeid_cast<const ColumnVector<Type> *>(nullable_column->getNestedColumnPtr().get()))
|
||||
{
|
||||
return [&null_data = nullable_column->getNullMapData(), &column_data = nested_column->getData()](size_t i)
|
||||
{ return Ternary::makeValue(column_data[i], null_data[i]); };
|
||||
return [
|
||||
&null_data = nullable_column->getNullMapData(),
|
||||
&column_data = nested_column->getData()](size_t i)
|
||||
{
|
||||
return Ternary::makeValue(column_data[i], null_data[i]);
|
||||
};
|
||||
}
|
||||
else
|
||||
return ValueGetterBuilderImpl<Types...>::build(x);
|
||||
|
@ -0,0 +1,6 @@
|
||||
\N
|
||||
1
|
||||
\N
|
||||
1
|
||||
\N
|
||||
1
|
@ -0,0 +1,6 @@
|
||||
SELECT NULL AND 1;
|
||||
SELECT NULL OR 1;
|
||||
SELECT materialize(NULL) AND 1;
|
||||
SELECT materialize(NULL) OR 1;
|
||||
SELECT arrayJoin([NULL]) AND 1;
|
||||
SELECT arrayJoin([NULL]) OR 1;
|
Loading…
Reference in New Issue
Block a user