mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
Merge pull request #32456 from ClickHouse/fix-29890
Fix arraySlice with null args.
This commit is contained in:
commit
26d606c158
@ -102,7 +102,7 @@ public:
|
||||
{
|
||||
if (!length_column || length_column->onlyNull())
|
||||
{
|
||||
return array_column;
|
||||
return arguments[0].column;
|
||||
}
|
||||
else if (isColumnConst(*length_column))
|
||||
sink = GatherUtils::sliceFromLeftConstantOffsetBounded(*source, 0, length_column->getInt(0));
|
||||
|
@ -35,6 +35,8 @@ slice
|
||||
[2,NULL,4,5]
|
||||
['b','c','d']
|
||||
['b',NULL,'d']
|
||||
[] 1
|
||||
[] 1
|
||||
push back
|
||||
\N
|
||||
[1,1]
|
||||
|
@ -36,6 +36,7 @@ select arraySlice([1, 2, 3, 4, 5, 6], 10, 1);
|
||||
select arraySlice([1, 2, Null, 4, 5, 6], 2, 4);
|
||||
select arraySlice(['a', 'b', 'c', 'd', 'e'], 2, 3);
|
||||
select arraySlice([Null, 'b', Null, 'd', 'e'], 2, 3);
|
||||
select arraySlice([], materialize(NULL), NULL), 1 from numbers(2);
|
||||
|
||||
select 'push back';
|
||||
select arrayPushBack(Null, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user