From 5d339f88e3dd8618d5ca44e3bae0232b103f19c5 Mon Sep 17 00:00:00 2001 From: obdev Date: Thu, 4 Aug 2022 19:30:09 +0800 Subject: [PATCH] Disable batch nlj when right is sample scan --- src/sql/optimizer/ob_log_join.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sql/optimizer/ob_log_join.cpp b/src/sql/optimizer/ob_log_join.cpp index 0833773208..3a833bfaea 100644 --- a/src/sql/optimizer/ob_log_join.cpp +++ b/src/sql/optimizer/ob_log_join.cpp @@ -1654,7 +1654,10 @@ int ObLogJoin::can_use_batch_nlj(bool& use_batch_nlj) ts = static_cast(get_child(1)); // normal table scan on real table use_batch_nlj = - (!is_virtual_table(ts->get_ref_table_id()) && !ts->get_is_fake_cte_table() && !ts->is_for_update()); + !is_virtual_table(ts->get_ref_table_id()) + && !ts->get_is_fake_cte_table() + && !ts->is_for_update() + && !ts->is_sample_scan(); } else { use_batch_nlj = false; }