bug/50761089 spatial index das update iterator should handle empty index column

This commit is contained in:
shadowao
2023-07-07 10:53:39 +00:00
committed by ob-robot
parent ddf7854eb4
commit 2538dec984

View File

@ -197,6 +197,8 @@ int ObDASUpdIterator::get_next_spatial_index_row(ObNewRow *&row)
if (OB_SUCC(ret)) { if (OB_SUCC(ret)) {
ObDASWriteBuffer &write_buffer = get_write_buffer(); ObDASWriteBuffer &write_buffer = get_write_buffer();
ObSpatIndexRow *spatial_rows = get_spatial_index_rows(); ObSpatIndexRow *spatial_rows = get_spatial_index_rows();
bool got_row = false;
while (OB_SUCC(ret) && ! got_row) {
if (OB_ISNULL(spatial_rows) || spatial_row_idx_ >= spatial_rows->count()) { if (OB_ISNULL(spatial_rows) || spatial_row_idx_ >= spatial_rows->count()) {
const ObChunkDatumStore::StoredRow *sr = nullptr; const ObChunkDatumStore::StoredRow *sr = nullptr;
spatial_row_idx_ = 0; spatial_row_idx_ = 0;
@ -234,10 +236,12 @@ int ObDASUpdIterator::get_next_spatial_index_row(ObNewRow *&row)
} }
} }
if (OB_SUCC(ret)) { if (OB_SUCC(ret) && spatial_row_idx_ < spatial_rows->count()) {
row = &(*spatial_rows)[spatial_row_idx_]; row = &(*spatial_rows)[spatial_row_idx_];
old_row_ = row; old_row_ = row;
spatial_row_idx_++; spatial_row_idx_++;
got_row = true;
}
} }
} }
return ret; return ret;