fix ColumnConst.isColumnNullable() and related crash

This commit is contained in:
chertus 2019-06-26 15:59:25 +03:00
parent 3149b57100
commit 6fe4640e0b
3 changed files with 9 additions and 0 deletions

View File

@ -199,6 +199,7 @@ public:
bool onlyNull() const override { return data->isNullAt(0); }
bool isColumnConst() const override { return true; }
bool isColumnNullable() const override { return data->isColumnNullable(); }
bool isNumeric() const override { return data->isNumeric(); }
bool isFixedAndContiguous() const override { return data->isFixedAndContiguous(); }
bool valuesHaveFixedSize() const override { return data->valuesHaveFixedSize(); }

View File

@ -0,0 +1,4 @@
1 Nullable(UInt8)
2 Nullable(UInt8)
1 Nullable(UInt8)
\N Nullable(Nothing)

View File

@ -0,0 +1,4 @@
SELECT coalesce(toNullable(1), toNullable(2)) as x, toTypeName(x);
SELECT coalesce(NULL, toNullable(2)) as x, toTypeName(x);
SELECT coalesce(toNullable(1), NULL) as x, toTypeName(x);
SELECT coalesce(NULL, NULL) as x, toTypeName(x);