[FTS] fix error code
This commit is contained in:
parent
04d61c5e0f
commit
e8a8cfedd5
@ -293,12 +293,13 @@ int ObDASFuncDataIter::inner_get_next_rows(int64_t &count, int64_t capacity)
|
||||
tr_merge_count = 0;
|
||||
if (OB_FAIL(tr_merge_iters_[i]->get_next_rows(tr_merge_count, capacity))) {
|
||||
if (OB_ITER_END != ret) {
|
||||
LOG_WARN("fail to get next row for tr merge iter", K(ret), K(i), KPC(tr_merge_iters_[i]));
|
||||
LOG_WARN("fail to get next rows for tr merge iter", K(ret), K(i), KPC(tr_merge_iters_[i]));
|
||||
} else {
|
||||
ret = OB_SUCCESS;
|
||||
}
|
||||
}
|
||||
if (OB_UNLIKELY(tmp_count != 0 && tmp_count != tr_merge_count)) {
|
||||
if (OB_FAIL(ret)) {
|
||||
} else if (OB_UNLIKELY(tmp_count != 0 && tmp_count != tr_merge_count)) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("unexpected error, tr merge count is not equal to tmp count", K(ret), K(tr_merge_count), K(tmp_count), K(i));
|
||||
} else if (OB_UNLIKELY(0 != tr_merge_count &&
|
||||
|
@ -218,6 +218,7 @@ int ObDASFuncLookupIter::add_rowkey()
|
||||
ObDatum &col_datum = expr->locate_expr_datum(*eval_ctx_);
|
||||
doc_id.from_string(col_datum.get_string());
|
||||
if (OB_UNLIKELY(!doc_id.is_valid())) {
|
||||
ret = OB_INVALID_ARGUMENT;
|
||||
LOG_WARN("invalid doc id", K(doc_id));
|
||||
} else if (OB_FAIL(merge_iter->add_doc_id(doc_id))) {
|
||||
LOG_WARN("failed to add doc id", K(ret));
|
||||
|
@ -948,7 +948,7 @@ int ObDASTRTaatIter::get_next_batch_rows(int64_t &count, int64_t capacity)
|
||||
LOG_WARN("failed to init stores by partition", K(ret));
|
||||
} else if (!is_chunk_store_inited_ && OB_FAIL(fill_chunk_store_by_tr_iter())) {
|
||||
LOG_WARN("failed to fill chunk store by tr iter", K(ret));
|
||||
} else if (cur_map_idx_>= hash_map_size_) {
|
||||
} else if (cur_map_idx_ >= hash_map_size_) {
|
||||
ret = OB_ITER_END;
|
||||
}
|
||||
bool clear_tag = OB_SUCC(ret) || ret == OB_ITER_END;
|
||||
@ -1328,7 +1328,7 @@ int ObDASTRTaatIter::fill_chunk_store_by_tr_iter()
|
||||
int ObDASTRTaatIter::load_next_hashmap()
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
if (cur_map_idx_>= hash_map_size_ - 1) {
|
||||
if (cur_map_idx_ >= hash_map_size_ - 1) {
|
||||
cur_map_idx_= hash_map_size_;
|
||||
ret = OB_ITER_END;
|
||||
} else if (FALSE_IT(++cur_map_idx_)) {
|
||||
@ -1575,7 +1575,7 @@ int ObDASTRTaatLookupIter::inner_get_next_row()
|
||||
if (OB_FAIL(get_next_batch_rows(count, cap))) {
|
||||
if (OB_UNLIKELY(OB_ITER_END != ret)) {
|
||||
LOG_WARN("failed to get next row with taat", K(ret));
|
||||
} else if (OB_UNLIKELY(count != 0)) {
|
||||
} else if (0 != count) {
|
||||
ret = OB_SUCCESS;
|
||||
}
|
||||
} else if (OB_UNLIKELY(count != 1)) {
|
||||
@ -1613,7 +1613,6 @@ int ObDASTRTaatLookupIter::inner_get_next_rows(int64_t &count, int64_t capacity)
|
||||
ObEvalCtx::BatchInfoScopeGuard guard(*ctx);
|
||||
guard.set_batch_idx(next_written_idx_);
|
||||
if (OB_FAIL(project_result(default_docid, 0))) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("failed to project result", K(ret));
|
||||
}
|
||||
next_written_idx_ ++;
|
||||
@ -1640,7 +1639,7 @@ int ObDASTRTaatLookupIter::inner_get_next_rows(int64_t &count, int64_t capacity)
|
||||
} else if (next_written_idx_ > rangekey_size_) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("unexpected capacity size", K(ret), K(capacity));
|
||||
} else if (next_written_idx_ == 0 &&OB_FAIL(get_next_batch_rows(count, capacity))) {
|
||||
} else if (next_written_idx_ == 0 && OB_FAIL(get_next_batch_rows(count, capacity))) {
|
||||
if (OB_UNLIKELY(OB_ITER_END != ret)) {
|
||||
LOG_WARN("failed to get next rows with taat", K(ret));
|
||||
}
|
||||
@ -1654,7 +1653,6 @@ int ObDASTRTaatLookupIter::inner_get_next_rows(int64_t &count, int64_t capacity)
|
||||
ObEvalCtx::BatchInfoScopeGuard guard(*ctx);
|
||||
guard.set_batch_idx(count);
|
||||
if (OB_FAIL(project_result(cache_doc_ids_[pos], relevances_[next_written_idx_]))) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("failed to project result", K(ret));
|
||||
}
|
||||
next_written_idx_++;
|
||||
@ -2120,7 +2118,6 @@ int ObDASTRDaatLookupIter::inner_get_next_row()
|
||||
if (OB_UNLIKELY(OB_ITER_END != ret)) {
|
||||
LOG_WARN("failed to pull next batch rows from iterator", K(ret));
|
||||
} else if (OB_FAIL(project_result(cache_doc_ids_[0], 0))) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("failed to project result", K(ret));
|
||||
} else {
|
||||
next_written_idx_ ++;
|
||||
@ -2160,7 +2157,6 @@ int ObDASTRDaatLookupIter::inner_get_next_rows(int64_t &count, int64_t capacity)
|
||||
ObEvalCtx::BatchInfoScopeGuard guard(*ctx);
|
||||
guard.set_batch_idx(next_written_idx_);
|
||||
if (OB_FAIL(project_result(default_docid, 0))) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("failed to project result", K(ret));
|
||||
}
|
||||
next_written_idx_ ++;
|
||||
@ -2210,7 +2206,6 @@ int ObDASTRDaatLookupIter::inner_get_next_rows(int64_t &count, int64_t capacity)
|
||||
ObEvalCtx::BatchInfoScopeGuard guard(*ctx);
|
||||
guard.set_batch_idx(pos);
|
||||
if (OB_FAIL(project_result(cache_doc_ids_[next_written_idx_], 0))) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("failed to project result", K(ret));
|
||||
}
|
||||
}
|
||||
@ -2238,7 +2233,6 @@ int ObDASTRDaatLookupIter::inner_get_next_rows(int64_t &count, int64_t capacity)
|
||||
ObEvalCtx::BatchInfoScopeGuard guard(*ctx);
|
||||
guard.set_batch_idx(count);
|
||||
if (OB_FAIL(project_result(cache_doc_ids_[pos], relevances_[next_written_idx_]))) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("failed to project result", K(ret));
|
||||
}
|
||||
next_written_idx_++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user