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

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


The following commit(s) were added to refs/heads/branch-1.2-lts by this push:
     new f013d1ede92 [fix](export)build_key_ranges_and_filters should not 
change original range after executing extend_scan_key function (#26462)
f013d1ede92 is described below

commit f013d1ede929af91447533015217028e4fd88347
Author: caiconghui <[email protected]>
AuthorDate: Tue Nov 7 17:07:10 2023 +0800

    [fix](export)build_key_ranges_and_filters should not change original range 
after executing extend_scan_key function (#26462)
---
 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to