Skip to content

Commit 158df61

Browse files
committed
Cleanup 2
1 parent e4fab67 commit 158df61

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ydb/library/yql/dq/runtime/dq_arrow_helpers.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1002,8 +1002,10 @@ class TBlockSplitter : public IBlockSplitter {
10021002
}
10031003

10041004
TItem PopBack(ui64 length) {
1005-
std::vector<arrow::Datum> backData = Data;
1005+
MKQL_ENSURE(length <= NumberRows, "Can not pop more than number of rows");
10061006
const auto offset = NumberRows - length;
1007+
1008+
std::vector<arrow::Datum> backData = Data;
10071009
for (ui64 i : ArraysIdx) {
10081010
const auto& array = *Data[i].array();
10091011
Data[i] = arrow::Datum(array.Slice(0, offset));

0 commit comments

Comments
 (0)