This is an automated email from the ASF dual-hosted git repository.

caiconghui pushed a commit to branch fix_export
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 34a1082f9d12983aa61617c0db8f6223fcb535b7
Author: caiconghui1 <caicongh...@jd.com>
AuthorDate: Mon Nov 6 15:05:23 2023 +0800

    [fix](export)build_key_ranges_and_filters should not change original range 
after executing extend_scan_key function
---
 be/src/exec/olap_scan_node.cpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/be/src/exec/olap_scan_node.cpp b/be/src/exec/olap_scan_node.cpp
index 3f6d215689a..9e776c3a3f9 100644
--- a/be/src/exec/olap_scan_node.cpp
+++ b/be/src/exec/olap_scan_node.cpp
@@ -784,7 +784,12 @@ Status OlapScanNode::build_key_ranges_and_filters() {
 
         RETURN_IF_ERROR(std::visit(
                 [&](auto&& range) {
-                    RETURN_IF_ERROR(_scan_keys.extend_scan_key(range, 
_max_scan_key_num,
+                    // make a copy or range and pass to extend_scan_key, keep 
the range unchanged
+                    // because extend_scan_key method may change the first 
parameter.
+                    // but the original range may be converted to olap 
filters, if it's not an exact_range.
+                    // related pr https://github.com/apache/doris/pull/13530
+                    auto temp_range = range;
+                    RETURN_IF_ERROR(_scan_keys.extend_scan_key(temp_range, 
_max_scan_key_num,
                                                                &exact_range, 
&eos));
                     if (exact_range) {
                         _column_value_ranges.erase(iter->first);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to