[fix] fix hash table insert() may be failed but not handle this error (#8207)
This commit is contained in:
@ -50,7 +50,9 @@ Status ExceptNode::open(RuntimeState* state) {
|
||||
|
||||
for (int i = 1; i < _children.size(); ++i) {
|
||||
// rebuild hash table, for first time will rebuild with the no duplicated _hash_tbl,
|
||||
if (i > 1) { refresh_hash_table<false>(i); }
|
||||
if (i > 1) {
|
||||
RETURN_IF_ERROR(refresh_hash_table<false>(i));
|
||||
}
|
||||
|
||||
// probe
|
||||
_probe_batch.reset(
|
||||
@ -63,17 +65,12 @@ Status ExceptNode::open(RuntimeState* state) {
|
||||
RETURN_IF_ERROR(child(i)->get_next(state, _probe_batch.get(), &eos));
|
||||
RETURN_IF_LIMIT_EXCEEDED(state, " Except , while probing the hash table.");
|
||||
for (int j = 0; j < _probe_batch->num_rows(); ++j) {
|
||||
VLOG_ROW << "probe row: "
|
||||
<< get_row_output_string(_probe_batch->get_row(j), child(i)->row_desc());
|
||||
_hash_tbl_iterator = _hash_tbl->find(_probe_batch->get_row(j));
|
||||
if (_hash_tbl_iterator != _hash_tbl->end()) {
|
||||
if (!_hash_tbl_iterator.matched()) {
|
||||
_hash_tbl_iterator.set_matched();
|
||||
_valid_element_in_hash_tbl--;
|
||||
}
|
||||
VLOG_ROW << "probe matched: "
|
||||
<< get_row_output_string(_hash_tbl_iterator.get_row(),
|
||||
child(0)->row_desc());
|
||||
}
|
||||
}
|
||||
_probe_batch->reset();
|
||||
@ -101,9 +98,6 @@ Status ExceptNode::get_next(RuntimeState* state, RowBatch* out_batch, bool* eos)
|
||||
out_batch->resize_and_allocate_tuple_buffer(state, &tuple_buf_size, &tuple_buf));
|
||||
memset(tuple_buf, 0, tuple_buf_size);
|
||||
while (_hash_tbl_iterator.has_next()) {
|
||||
VLOG_ROW << "find row: "
|
||||
<< get_row_output_string(_hash_tbl_iterator.get_row(), child(0)->row_desc())
|
||||
<< " matched: " << _hash_tbl_iterator.matched();
|
||||
if (!_hash_tbl_iterator.matched()) {
|
||||
create_output_row(_hash_tbl_iterator.get_row(), out_batch, tuple_buf);
|
||||
tuple_buf += _tuple_desc->byte_size();
|
||||
|
||||
Reference in New Issue
Block a user