Skip to content

Commit b616378

Browse files
committed
Fix prev_offset for arraySymmetricDifference
1 parent b115c61 commit b616378

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Functions/array/arrayIntersect.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,12 @@ ColumnPtr FunctionArrayIntersect<Mode>::execute(const UnpackedArrays & arrays, M
680680
null_map.push_back(1);
681681
null_added = true;
682682
}
683+
const auto & arg = arrays.args[0];
684+
// const array has only one row
685+
if (arg.is_const)
686+
prev_off[0] = 0;
687+
else
688+
prev_off[0] = (*arg.offsets)[row];
683689
}
684690
else if constexpr (std::is_same_v<Mode, ArrayModeIntersect>)
685691
{

0 commit comments

Comments
 (0)