mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 17:12:03 +00:00
Fix assert in arrayElement
This commit is contained in:
parent
0adf8c723e
commit
a4e8c47702
@ -780,8 +780,10 @@ void FunctionArrayElement::executeImpl(Block & block, const ColumnNumbers & argu
|
|||||||
ArrayImpl::NullMapBuilder builder;
|
ArrayImpl::NullMapBuilder builder;
|
||||||
Block source_block;
|
Block source_block;
|
||||||
|
|
||||||
const auto & input_type = typeid_cast<const DataTypeNullable &>(*typeid_cast<const DataTypeArray &>(*block.getByPosition(arguments[0]).type).getNestedType()).getNestedType();
|
const DataTypePtr & input_type = typeid_cast<const DataTypeNullable &>(
|
||||||
const auto & tmp_ret_type = typeid_cast<const DataTypeNullable &>(*block.getByPosition(result).type).getNestedType();
|
*typeid_cast<const DataTypeArray &>(*block.getByPosition(arguments[0]).type).getNestedType()).getNestedType();
|
||||||
|
|
||||||
|
DataTypePtr tmp_ret_type = removeNullable(block.getByPosition(result).type);
|
||||||
|
|
||||||
if (col_array)
|
if (col_array)
|
||||||
{
|
{
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
[1] 1
|
||||||
|
[1] 1
|
||||||
|
[1] 1
|
||||||
|
[1] 1
|
@ -0,0 +1,4 @@
|
|||||||
|
SELECT [toNullable(1)] AS x, x[toNullable(1)] AS y;
|
||||||
|
SELECT materialize([toNullable(1)]) AS x, x[toNullable(1)] AS y;
|
||||||
|
SELECT [toNullable(1)] AS x, x[materialize(toNullable(1))] AS y;
|
||||||
|
SELECT materialize([toNullable(1)]) AS x, x[materialize(toNullable(1))] AS y;
|
Loading…
Reference in New Issue
Block a user