You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by pa...@apache.org on 2024/01/04 03:58:46 UTC

(doris) branch master updated: [Bug](mark-join) fix wrong result on mark join + other conjunct (#29321)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new d8a08dad902 [Bug](mark-join) fix wrong result on mark join + other conjunct (#29321)
d8a08dad902 is described below

commit d8a08dad902a12716572bd3a6c21a7c3d9e6e5bd
Author: Pxl <px...@qq.com>
AuthorDate: Thu Jan 4 11:58:39 2024 +0800

    [Bug](mark-join) fix wrong result on mark join + other conjunct (#29321)
    
    fix wrong result on mark join + other conjunct
---
 be/src/vec/common/hash_table/hash_map.h            |   32 +-
 .../vec/exec/join/process_hash_table_probe_impl.h  |   67 +-
 .../{jira8317.out => rqg/doris8317/doris8317.out}  |    0
 .../data/query_p0/join/rqg/doris9097/doris9097.out | 1247 ++++++++++++++++++++
 .../data/query_p0/join/rqg/doris9100/doris9100.out |  675 +++++++++++
 .../data/query_p0/join/rqg/doris9161/doris9161.out |   27 +
 .../doris8317/doris8317.groovy}                    |    2 +-
 .../query_p0/join/rqg/doris9097/doris9097.groovy   |   69 ++
 .../query_p0/join/rqg/doris9100/doris9100.groovy   |   69 ++
 .../query_p0/join/rqg/doris9161/doris9161.groovy   |   65 +
 10 files changed, 2208 insertions(+), 45 deletions(-)

diff --git a/be/src/vec/common/hash_table/hash_map.h b/be/src/vec/common/hash_table/hash_map.h
index cb2809492ae..457df7e6281 100644
--- a/be/src/vec/common/hash_table/hash_map.h
+++ b/be/src/vec/common/hash_table/hash_map.h
@@ -273,17 +273,16 @@ public:
             }
         }
 
-        if constexpr (is_mark_join) {
-            return _find_batch_mark<JoinOpType, with_other_conjuncts>(
-                    keys, build_idx_map, probe_idx, probe_rows, probe_idxs, build_idxs,
-                    mark_column);
-        }
-
         if constexpr (with_other_conjuncts) {
             return _find_batch_conjunct<JoinOpType>(keys, build_idx_map, probe_idx, build_idx,
                                                     probe_rows, probe_idxs, build_idxs);
         }
 
+        if constexpr (is_mark_join) {
+            return _find_batch_mark<JoinOpType>(keys, build_idx_map, probe_idx, probe_rows,
+                                                probe_idxs, build_idxs, mark_column);
+        }
+
         if constexpr (JoinOpType == doris::TJoinOp::INNER_JOIN ||
                       JoinOpType == doris::TJoinOp::FULL_OUTER_JOIN ||
                       JoinOpType == doris::TJoinOp::LEFT_OUTER_JOIN ||
@@ -341,7 +340,7 @@ public:
 
 private:
     // only LEFT_ANTI_JOIN/LEFT_SEMI_JOIN/NULL_AWARE_LEFT_ANTI_JOIN/CROSS_JOIN support mark join
-    template <int JoinOpType, bool with_other_conjuncts>
+    template <int JoinOpType>
     auto _find_batch_mark(const Key* __restrict keys, const uint32_t* __restrict build_idx_map,
                           int probe_idx, int probe_rows, uint32_t* __restrict probe_idxs,
                           uint32_t* __restrict build_idxs,
@@ -356,18 +355,16 @@ private:
                 build_idx = next[build_idx];
             }
 
-            if constexpr (!with_other_conjuncts) {
-                if (build_idx_map[probe_idx] == bucket_size) {
-                    // mark result as null when probe row is null
+            if (build_idx_map[probe_idx] == bucket_size) {
+                // mark result as null when probe row is null
+                mark_column->insert_null();
+            } else {
+                bool matched = JoinOpType == doris::TJoinOp::LEFT_SEMI_JOIN ? build_idx != 0
+                                                                            : build_idx == 0;
+                if (!matched && _has_null_key) {
                     mark_column->insert_null();
                 } else {
-                    bool matched = JoinOpType == doris::TJoinOp::LEFT_SEMI_JOIN ? build_idx != 0
-                                                                                : build_idx == 0;
-                    if (!matched && _has_null_key) {
-                        mark_column->insert_null();
-                    } else {
-                        mark_column->insert_value(matched);
-                    }
+                    mark_column->insert_value(matched);
                 }
             }
 
@@ -472,6 +469,7 @@ private:
 
             if constexpr (JoinOpType == doris::TJoinOp::LEFT_OUTER_JOIN ||
                           JoinOpType == doris::TJoinOp::FULL_OUTER_JOIN ||
+                          JoinOpType == doris::TJoinOp::LEFT_SEMI_JOIN ||
                           JoinOpType == doris::TJoinOp::LEFT_ANTI_JOIN ||
                           JoinOpType == doris::TJoinOp::NULL_AWARE_LEFT_ANTI_JOIN) {
                 // may over batch_size when emplace 0 into build_idxs
diff --git a/be/src/vec/exec/join/process_hash_table_probe_impl.h b/be/src/vec/exec/join/process_hash_table_probe_impl.h
index c8f2ae0e554..91c43763b3d 100644
--- a/be/src/vec/exec/join/process_hash_table_probe_impl.h
+++ b/be/src/vec/exec/join/process_hash_table_probe_impl.h
@@ -235,10 +235,10 @@ Status ProcessHashTableProbe<JoinOpType, Parent>::do_other_join_conjuncts(
     filter_column->get_data() = std::move(other_conjunct_filter);
     auto result_column_id = output_block->columns();
     output_block->insert({std::move(filter_column), std::make_shared<DataTypeUInt8>(), ""});
-    const uint8_t* __restrict filter_column_ptr =
-            assert_cast<const ColumnUInt8*>(
-                    output_block->get_by_position(result_column_id).column.get())
-                    ->get_data()
+    uint8_t* __restrict filter_column_ptr =
+            assert_cast<ColumnUInt8&>(
+                    output_block->get_by_position(result_column_id).column->assume_mutable_ref())
+                    .get_data()
                     .data();
 
     if constexpr (JoinOpType == TJoinOp::LEFT_OUTER_JOIN ||
@@ -278,40 +278,53 @@ Status ProcessHashTableProbe<JoinOpType, Parent>::do_other_join_conjuncts(
         auto new_filter_column = ColumnUInt8::create(row_count);
         auto* __restrict filter_map = new_filter_column->get_data().data();
 
-        if (is_mark_join) {
-            auto mark_column =
-                    output_block->get_by_position(orig_columns - 1).column->assume_mutable();
-            ColumnFilterHelper helper(*mark_column);
+        for (size_t i = 0; i < row_count; ++i) {
+            bool not_matched_before = _parent->_last_probe_match != _probe_indexs[i];
 
-            for (size_t i = 0; i < row_count; ++i) {
-                filter_map[i] = true;
-                if (has_null_in_build_side &&
-                    (_build_indexs[i] != 0) ^ (JoinOpType == TJoinOp::LEFT_SEMI_JOIN)) {
-                    helper.insert_null();
-                } else {
-                    helper.insert_value(filter_column_ptr[i]);
-                }
-            }
-        } else {
+            // _build_indexs[i] == 0 means the end of this probe index
+            // if a probe row not matched with any build row, we need output a false value into mark column
             if constexpr (JoinOpType == TJoinOp::LEFT_SEMI_JOIN) {
-                for (size_t i = 0; i < row_count; ++i) {
+                if (_build_indexs[i] == 0) {
+                    filter_map[i] = is_mark_join && not_matched_before;
+                    filter_column_ptr[i] = false;
+                } else {
                     if (filter_column_ptr[i]) {
-                        filter_map[i] = _parent->_last_probe_match != _probe_indexs[i];
+                        filter_map[i] = not_matched_before;
                         _parent->_last_probe_match = _probe_indexs[i];
                     } else {
                         filter_map[i] = false;
                     }
                 }
             } else {
-                for (size_t i = 0; i < row_count; ++i) {
-                    if (_build_indexs[i]) {
-                        filter_map[i] = false;
-                        if (filter_column_ptr[i]) {
-                            _parent->_last_probe_match = _probe_indexs[i];
-                        }
+                if (_build_indexs[i] == 0) {
+                    if (not_matched_before) {
+                        filter_map[i] = true;
+                    } else if (is_mark_join) {
+                        filter_map[i] = true;
+                        filter_column_ptr[i] = false;
                     } else {
-                        filter_map[i] = _parent->_last_probe_match != _probe_indexs[i];
+                        filter_map[i] = false;
                     }
+                } else {
+                    filter_map[i] = false;
+                    if (filter_column_ptr[i]) {
+                        _parent->_last_probe_match = _probe_indexs[i];
+                    }
+                }
+            }
+        }
+
+        if (is_mark_join) {
+            auto mark_column =
+                    output_block->get_by_position(orig_columns - 1).column->assume_mutable();
+            ColumnFilterHelper helper(*mark_column);
+            for (size_t i = 0; i < row_count; ++i) {
+                bool mathced = filter_column_ptr[i] &&
+                               (_build_indexs[i] != 0) == (JoinOpType == TJoinOp::LEFT_SEMI_JOIN);
+                if (has_null_in_build_side && !mathced) {
+                    helper.insert_null();
+                } else {
+                    helper.insert_value(mathced);
                 }
             }
         }
diff --git a/regression-test/data/query_p0/join/jira8317.out b/regression-test/data/query_p0/join/rqg/doris8317/doris8317.out
similarity index 100%
rename from regression-test/data/query_p0/join/jira8317.out
rename to regression-test/data/query_p0/join/rqg/doris8317/doris8317.out
diff --git a/regression-test/data/query_p0/join/rqg/doris9097/doris9097.out b/regression-test/data/query_p0/join/rqg/doris9097/doris9097.out
new file mode 100644
index 00000000000..104a0a50a68
--- /dev/null
+++ b/regression-test/data/query_p0/join/rqg/doris9097/doris9097.out
@@ -0,0 +1,1247 @@
+-- This file is automatically generated. You should know what you did if you want to edit this
+-- !sql --
+\N	\N	\N
+\N	\N	\N
+\N	\N	\N
+\N	\N	\N
+\N	\N	\N
+\N	\N	\N
+\N	\N	\N
+\N	\N	\N
+\N	\N	\N
+\N	\N	\N
+\N	\N	\N
+\N	\N	\N
+\N	\N	\N
+\N	\N	\N
+\N	\N	\N
+\N	\N	\N
+\N	\N	\N
+\N	\N	\N
+\N	\N	\N
+\N	\N	\N
+\N	\N	\N
+\N	\N	\N
+\N	\N	\N
+\N	\N	\N
+\N	\N	\N
+\N	\N	\N
+\N	\N	\N
+\N	\N	\N
+\N	\N	\N
+\N	\N	\N
+0	-14	-4165951762050400392
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+1	-22	42
+2	-31036	\N
+3	5122904558131244484	55
+4	28281	-14840
+5	4998879	\N
+6	-9011739143110076452	5760847056946960390
+7	-21141	-4639555
+8	\N	69
+9	47	-33
+10	-2653	-2050470
+11	-3096865741370563762	-4395444096438300201
+12	8933	-57
+13	-16556	3365621276362527887
+14	8639540759788641439	\N
+15	-6471665	-2209385869700130743
+16	6121677622945129007	-381175611996409568
+17	16	-9
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+18	96	5261214778918955972
+19	-3190030	14558
+20	\N	4002210367497857601
+21	-2417492463683254524	2437165
+22	-30106	2026291529499254125
+23	-83	\N
+24	-7597554640479267935	-7040
+25	7511059121559581870	3060650817839057930
+26	37	-25088
+27	\N	3286825761820654939
+28	6984780763526232152	-1696890
+29	607433514646944202	\N
+30	2484999127969171851	6501667047378286768
+31	-8944201460241552737	-1851929377371097733
+32	-4761807	5084060818860982754
+33	-998765803011921378	3052839
+34	-2422426	\N
+35	8226094	3615385
+36	553468726038220225	-1764
+37	670883	-101
+38	70	-120
+39	-3776715	59
+40	4838937589070057812	8421394462175681931
+41	-8994792392196862725	77
+42	358664322720405440	37628358154783384
+43	-10499	5195869005935872176
+44	7094832329480659747	\N
+45	-3766135074507305544	\N
+46	-19497	\N
+47	\N	-3306469
+48	-8528460007943599117	-1760325
+49	51	-5730441742947563969
+50	4904	-35
+51	\N	2266909843852358544
+52	\N	-26111
+53	-7461439	5945675
+54	4702	23553
+55	8714341737190065819	-4912359469229728482
+56	-5772956446943208518	-5510453229343346156
+57	22147	11380
+58	-271231	4844883274403358382
+59	\N	-6225263610759264362
+60	4911949562198616949	-7032191710347925689
+61	2366848313821501436	7721423
+62	-2356829323247206674	\N
+63	3438657	4913409987497477076
+64	205319	-6184634268801161880
+65	936397305511590189	8575308369769699770
+66	-21036	\N
+67	4752785390673666391	\N
+68	-8170821256325143097	6817864
+69	-2224094628387595468	-214665093470046299
+70	\N	9
+71	7230382	9089379410838309690
+72	-5237482133941049538	-49
+73	-42	-3172351743764464897
+74	-13827	\N
+75	3706599682931749944	-5649032
+76	14643	-2140615177833884381
+77	\N	\N
+78	-3795163407934655216	750767363278959554
+79	\N	\N
+80	6926419441738996233	6975784
+81	126	-9035713900849626698
+82	-2538385782765190414	-108
+83	\N	-4549922981680820874
+84	4319827	16024
+85	6945582	4073160
+86	\N	-692268
+87	4245304169440330766	-7072
+88	5945276832456638628	-2365942883662944868
+89	\N	-2388393067867782794
+90	-5214488184918655339	\N
+91	30283	\N
+92	-90	38
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+93	-25524	122
+94	-7862022026564249911	-2367701296362663887
+95	-817367	-495064661339257714
+96	-6477009766812963182	505064392123637243
+97	-4212727	-966726935248378936
+98	2710217762115406921	20
+99	33	17057
+100	297646150647682171	-2607623
+101	-88	-3232274902461632667
+102	-17	\N
+103	4735099315894678131	-7143380563506233557
+104	-6114629	\N
+105	-6040087	54
+106	\N	5694210904475655638
+107	-8387506967423869699	\N
+108	-1200509747943337285	-1982987472413558725
+109	-5787994070893010124	4804116496319588906
+110	-5847622334778768426	-3828113
+111	-7145913	-4830400489803902514
+112	-6791542	\N
+113	102	-28676
+114	4559705686744173283	-361992158254727273
+115	24	-4962511944791919861
+116	6736805	\N
+117	714332520320791632	-6640685
+118	665818	\N
+119	\N	6074163
+120	\N	-689070
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+121	-24	25064
+122	-78	\N
+123	-549609113203121688	-24
+124	867146817841041115	\N
+125	18	\N
+126	\N	3285560946807474017
+127	-121	22757
+128	-168249	10237
+129	\N	7481297522829648294
+130	30251	-6399586
+131	4913495183669183344	1004467
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+132	-125	5158677
+133	6796363357274032079	14277
+134	\N	5767025869625213417
+135	26050	2118224
+136	-28074	1093528676464769316
+137	5420832	1955694
+138	\N	383669235443209662
+139	2946121	-62
+140	-46	-9103267825327065989
+141	-2949206507486668335	\N
+142	7036366	41
+143	-2416	-27383
+144	5263065124401825017	-58
+145	18339	93580
+146	-2823256	\N
+147	31	5357061248952387955
+148	-7790563706290535640	5832941602789907383
+149	-3582753873899681689	-3509356
+150	7698857985126772079	2631959234629626497
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+151	-22	-7241526962894484810
+152	32766	1120676
+153	121	\N
+154	-73	-32573
+155	-267140	\N
+156	-3175935028278370307	3956401
+157	-2640860357207331704	\N
+158	-23	-829791381322143745
+159	\N	9198943545490679406
+160	4663366	-9
+161	\N	-5324668
+162	-25386	-7894
+163	5935697978930437786	-2987157224263042376
+164	\N	\N
+165	3079442770836003020	15624
+166	\N	2844590
+167	8174989	\N
+168	-5234876096344461099	\N
+169	\N	-808535820293485985
+170	3047	4618027729343988180
+171	-3479334715353462914	-8850259923204901454
+172	7134764104706561197	-7948216698165016748
+173	\N	7983
+174	9094192116522804213	7936371815602286177
+175	115	-19186
+176	-15	-94
+177	4149688	8118110311274911792
+178	24	6082409991708653871
+179	10855	175271238959455287
+180	6371602194660725537	-8711326855478897833
+181	\N	5763795460485481412
+182	-8307328	1906052682016060224
+183	\N	12268
+184	3046273	\N
+185	-6588939	6916090673012065327
+186	\N	\N
+187	8041856941272546055	-87
+188	-10281	\N
+189	\N	39
+190	23377	27
+191	4	8627434086799523779
+192	-1460261672930855623	-23538
+193	-2127548144750619471	-29
+194	-7734454	5163552029475087908
+195	-2678129615356484135	122
+196	\N	-71
+197	16978	\N
+198	8853	-27868
+199	-428134739055343020	13182
+
diff --git a/regression-test/data/query_p0/join/rqg/doris9100/doris9100.out b/regression-test/data/query_p0/join/rqg/doris9100/doris9100.out
new file mode 100644
index 00000000000..5da1b6dd615
--- /dev/null
+++ b/regression-test/data/query_p0/join/rqg/doris9100/doris9100.out
@@ -0,0 +1,675 @@
+-- This file is automatically generated. You should know what you did if you want to edit this
+-- !sql --
+0	-7241526962894484810	0
+0	-4962511944791919861	0
+0	42	0
+0	6082409991708653871	0
+1	-7241526962894484810	1
+1	-4962511944791919861	1
+1	42	1
+1	6082409991708653871	1
+3	-7241526962894484810	3
+3	-4962511944791919861	3
+3	42	3
+3	6082409991708653871	3
+6	-7241526962894484810	6
+6	-4962511944791919861	6
+6	42	6
+6	6082409991708653871	6
+7	-7241526962894484810	7
+7	-4962511944791919861	7
+7	42	7
+7	6082409991708653871	7
+8	-7241526962894484810	8
+8	-4962511944791919861	8
+8	42	8
+8	6082409991708653871	8
+10	-7241526962894484810	10
+10	-4962511944791919861	10
+10	42	10
+10	6082409991708653871	10
+11	-7241526962894484810	11
+11	-4962511944791919861	11
+11	42	11
+11	6082409991708653871	11
+13	-7241526962894484810	13
+13	-4962511944791919861	13
+13	42	13
+13	6082409991708653871	13
+14	-7241526962894484810	14
+14	-4962511944791919861	14
+14	42	14
+14	6082409991708653871	14
+15	-7241526962894484810	15
+15	-4962511944791919861	15
+15	42	15
+15	6082409991708653871	15
+17	-7241526962894484810	17
+17	-4962511944791919861	17
+17	42	17
+17	6082409991708653871	17
+18	-7241526962894484810	18
+18	-4962511944791919861	18
+18	42	18
+18	6082409991708653871	18
+19	-7241526962894484810	19
+19	-4962511944791919861	19
+19	42	19
+19	6082409991708653871	19
+20	-7241526962894484810	20
+20	-4962511944791919861	20
+20	42	20
+20	6082409991708653871	20
+21	-7241526962894484810	21
+21	-4962511944791919861	21
+21	42	21
+21	6082409991708653871	21
+22	-7241526962894484810	22
+22	-4962511944791919861	22
+22	42	22
+22	6082409991708653871	22
+23	-7241526962894484810	23
+23	-4962511944791919861	23
+23	42	23
+23	6082409991708653871	23
+24	-7241526962894484810	24
+24	-4962511944791919861	24
+24	42	24
+24	6082409991708653871	24
+25	-7241526962894484810	25
+25	-4962511944791919861	25
+25	42	25
+25	6082409991708653871	25
+26	-7241526962894484810	26
+26	-4962511944791919861	26
+26	42	26
+26	6082409991708653871	26
+27	-7241526962894484810	27
+27	-4962511944791919861	27
+27	42	27
+27	6082409991708653871	27
+28	-7241526962894484810	28
+28	-4962511944791919861	28
+28	42	28
+28	6082409991708653871	28
+29	-7241526962894484810	29
+29	-4962511944791919861	29
+29	42	29
+29	6082409991708653871	29
+30	-7241526962894484810	30
+30	-4962511944791919861	30
+30	42	30
+30	6082409991708653871	30
+31	-7241526962894484810	31
+31	-4962511944791919861	31
+31	42	31
+31	6082409991708653871	31
+32	-7241526962894484810	32
+32	-4962511944791919861	32
+32	42	32
+32	6082409991708653871	32
+34	-7241526962894484810	34
+34	-4962511944791919861	34
+34	42	34
+34	6082409991708653871	34
+35	-7241526962894484810	35
+35	-4962511944791919861	35
+35	42	35
+35	6082409991708653871	35
+36	-7241526962894484810	36
+36	-4962511944791919861	36
+36	42	36
+36	6082409991708653871	36
+37	-7241526962894484810	37
+37	-4962511944791919861	37
+37	42	37
+37	6082409991708653871	37
+38	-7241526962894484810	38
+38	-4962511944791919861	38
+38	42	38
+38	6082409991708653871	38
+40	-7241526962894484810	40
+40	-4962511944791919861	40
+40	42	40
+40	6082409991708653871	40
+41	-7241526962894484810	41
+41	-4962511944791919861	41
+41	42	41
+41	6082409991708653871	41
+42	-7241526962894484810	42
+42	-4962511944791919861	42
+42	42	42
+42	6082409991708653871	42
+43	-7241526962894484810	43
+43	-4962511944791919861	43
+43	42	43
+43	6082409991708653871	43
+44	-7241526962894484810	44
+44	-4962511944791919861	44
+44	42	44
+44	6082409991708653871	44
+45	-7241526962894484810	45
+45	-4962511944791919861	45
+45	42	45
+45	6082409991708653871	45
+46	-7241526962894484810	46
+46	-4962511944791919861	46
+46	42	46
+46	6082409991708653871	46
+47	-7241526962894484810	47
+47	-4962511944791919861	47
+47	42	47
+47	6082409991708653871	47
+48	-7241526962894484810	48
+48	-4962511944791919861	48
+48	42	48
+48	6082409991708653871	48
+49	-7241526962894484810	49
+49	-4962511944791919861	49
+49	42	49
+49	6082409991708653871	49
+50	-7241526962894484810	50
+50	-4962511944791919861	50
+50	42	50
+50	6082409991708653871	50
+51	-7241526962894484810	51
+51	-4962511944791919861	51
+51	42	51
+51	6082409991708653871	51
+52	-7241526962894484810	52
+52	-4962511944791919861	52
+52	42	52
+52	6082409991708653871	52
+54	-7241526962894484810	54
+54	-4962511944791919861	54
+54	42	54
+54	6082409991708653871	54
+55	-7241526962894484810	55
+55	-4962511944791919861	55
+55	42	55
+55	6082409991708653871	55
+56	-7241526962894484810	56
+56	-4962511944791919861	56
+56	42	56
+56	6082409991708653871	56
+57	-7241526962894484810	57
+57	-4962511944791919861	57
+57	42	57
+57	6082409991708653871	57
+58	-7241526962894484810	58
+58	-4962511944791919861	58
+58	42	58
+58	6082409991708653871	58
+59	-7241526962894484810	59
+59	-4962511944791919861	59
+59	42	59
+59	6082409991708653871	59
+60	-7241526962894484810	60
+60	-4962511944791919861	60
+60	42	60
+60	6082409991708653871	60
+61	-7241526962894484810	61
+61	-4962511944791919861	61
+61	42	61
+61	6082409991708653871	61
+63	-7241526962894484810	63
+63	-4962511944791919861	63
+63	42	63
+63	6082409991708653871	63
+64	-7241526962894484810	64
+64	-4962511944791919861	64
+64	42	64
+64	6082409991708653871	64
+65	-7241526962894484810	65
+65	-4962511944791919861	65
+65	42	65
+65	6082409991708653871	65
+66	-7241526962894484810	66
+66	-4962511944791919861	66
+66	42	66
+66	6082409991708653871	66
+67	-7241526962894484810	67
+67	-4962511944791919861	67
+67	42	67
+67	6082409991708653871	67
+68	-7241526962894484810	68
+68	-4962511944791919861	68
+68	42	68
+68	6082409991708653871	68
+69	-7241526962894484810	69
+69	-4962511944791919861	69
+69	42	69
+69	6082409991708653871	69
+70	-7241526962894484810	70
+70	-4962511944791919861	70
+70	42	70
+70	6082409991708653871	70
+71	-7241526962894484810	71
+71	-4962511944791919861	71
+71	42	71
+71	6082409991708653871	71
+72	-7241526962894484810	72
+72	-4962511944791919861	72
+72	42	72
+72	6082409991708653871	72
+73	-7241526962894484810	73
+73	-4962511944791919861	73
+73	42	73
+73	6082409991708653871	73
+74	-7241526962894484810	74
+74	-4962511944791919861	74
+74	42	74
+74	6082409991708653871	74
+75	-7241526962894484810	75
+75	-4962511944791919861	75
+75	42	75
+75	6082409991708653871	75
+77	-7241526962894484810	77
+77	-4962511944791919861	77
+77	42	77
+77	6082409991708653871	77
+78	-7241526962894484810	78
+78	-4962511944791919861	78
+78	42	78
+78	6082409991708653871	78
+80	-7241526962894484810	80
+80	-4962511944791919861	80
+80	42	80
+80	6082409991708653871	80
+81	-7241526962894484810	81
+81	-4962511944791919861	81
+81	42	81
+81	6082409991708653871	81
+82	-7241526962894484810	82
+82	-4962511944791919861	82
+82	42	82
+82	6082409991708653871	82
+84	-7241526962894484810	84
+84	-4962511944791919861	84
+84	42	84
+84	6082409991708653871	84
+85	-7241526962894484810	85
+85	-4962511944791919861	85
+85	42	85
+85	6082409991708653871	85
+86	-7241526962894484810	86
+86	-4962511944791919861	86
+86	42	86
+86	6082409991708653871	86
+87	-7241526962894484810	87
+87	-4962511944791919861	87
+87	42	87
+87	6082409991708653871	87
+88	-7241526962894484810	88
+88	-4962511944791919861	88
+88	42	88
+88	6082409991708653871	88
+89	-7241526962894484810	89
+89	-4962511944791919861	89
+89	42	89
+89	6082409991708653871	89
+90	-7241526962894484810	90
+90	-4962511944791919861	90
+90	42	90
+90	6082409991708653871	90
+91	-7241526962894484810	91
+91	-4962511944791919861	91
+91	42	91
+91	6082409991708653871	91
+92	-7241526962894484810	92
+92	-4962511944791919861	92
+92	42	92
+92	6082409991708653871	92
+95	-7241526962894484810	95
+95	-4962511944791919861	95
+95	42	95
+95	6082409991708653871	95
+96	-7241526962894484810	96
+96	-4962511944791919861	96
+96	42	96
+96	6082409991708653871	96
+98	-7241526962894484810	98
+98	-4962511944791919861	98
+98	42	98
+98	6082409991708653871	98
+99	-7241526962894484810	99
+99	-4962511944791919861	99
+99	42	99
+99	6082409991708653871	99
+100	-7241526962894484810	100
+100	-4962511944791919861	100
+100	42	100
+100	6082409991708653871	100
+101	-7241526962894484810	101
+101	-4962511944791919861	101
+101	42	101
+101	6082409991708653871	101
+103	-7241526962894484810	103
+103	-4962511944791919861	103
+103	42	103
+103	6082409991708653871	103
+104	-7241526962894484810	104
+104	-4962511944791919861	104
+104	42	104
+104	6082409991708653871	104
+105	-7241526962894484810	105
+105	-4962511944791919861	105
+105	42	105
+105	6082409991708653871	105
+106	-7241526962894484810	106
+106	-4962511944791919861	106
+106	42	106
+106	6082409991708653871	106
+107	-7241526962894484810	107
+107	-4962511944791919861	107
+107	42	107
+107	6082409991708653871	107
+108	-7241526962894484810	108
+108	-4962511944791919861	108
+108	42	108
+108	6082409991708653871	108
+109	-7241526962894484810	109
+109	-4962511944791919861	109
+109	42	109
+109	6082409991708653871	109
+110	-7241526962894484810	110
+110	-4962511944791919861	110
+110	42	110
+110	6082409991708653871	110
+111	-7241526962894484810	111
+111	-4962511944791919861	111
+111	42	111
+111	6082409991708653871	111
+112	-7241526962894484810	112
+112	-4962511944791919861	112
+112	42	112
+112	6082409991708653871	112
+113	-7241526962894484810	113
+113	-4962511944791919861	113
+113	42	113
+113	6082409991708653871	113
+114	-7241526962894484810	114
+114	-4962511944791919861	114
+114	42	114
+114	6082409991708653871	114
+115	-7241526962894484810	115
+115	-4962511944791919861	115
+115	42	115
+115	6082409991708653871	115
+116	-7241526962894484810	116
+116	-4962511944791919861	116
+116	42	116
+116	6082409991708653871	116
+118	-7241526962894484810	118
+118	-4962511944791919861	118
+118	42	118
+118	6082409991708653871	118
+119	-7241526962894484810	119
+119	-4962511944791919861	119
+119	42	119
+119	6082409991708653871	119
+120	-7241526962894484810	120
+120	-4962511944791919861	120
+120	42	120
+120	6082409991708653871	120
+121	-7241526962894484810	121
+121	-4962511944791919861	121
+121	42	121
+121	6082409991708653871	121
+122	-7241526962894484810	122
+122	-4962511944791919861	122
+122	42	122
+122	6082409991708653871	122
+123	-7241526962894484810	123
+123	-4962511944791919861	123
+123	42	123
+123	6082409991708653871	123
+124	-7241526962894484810	124
+124	-4962511944791919861	124
+124	42	124
+124	6082409991708653871	124
+125	-7241526962894484810	125
+125	-4962511944791919861	125
+125	42	125
+125	6082409991708653871	125
+127	-7241526962894484810	127
+127	-4962511944791919861	127
+127	42	127
+127	6082409991708653871	127
+128	-7241526962894484810	128
+128	-4962511944791919861	128
+128	42	128
+128	6082409991708653871	128
+129	-7241526962894484810	129
+129	-4962511944791919861	129
+129	42	129
+129	6082409991708653871	129
+130	-7241526962894484810	130
+130	-4962511944791919861	130
+130	42	130
+130	6082409991708653871	130
+131	-7241526962894484810	131
+131	-4962511944791919861	131
+131	42	131
+131	6082409991708653871	131
+132	-7241526962894484810	132
+132	-4962511944791919861	132
+132	42	132
+132	6082409991708653871	132
+133	-7241526962894484810	133
+133	-4962511944791919861	133
+133	42	133
+133	6082409991708653871	133
+134	-7241526962894484810	134
+134	-4962511944791919861	134
+134	42	134
+134	6082409991708653871	134
+135	-7241526962894484810	135
+135	-4962511944791919861	135
+135	42	135
+135	6082409991708653871	135
+136	-7241526962894484810	136
+136	-4962511944791919861	136
+136	42	136
+136	6082409991708653871	136
+137	-7241526962894484810	137
+137	-4962511944791919861	137
+137	42	137
+137	6082409991708653871	137
+138	-7241526962894484810	138
+138	-4962511944791919861	138
+138	42	138
+138	6082409991708653871	138
+139	-7241526962894484810	139
+139	-4962511944791919861	139
+139	42	139
+139	6082409991708653871	139
+140	-7241526962894484810	140
+140	-4962511944791919861	140
+140	42	140
+140	6082409991708653871	140
+141	-7241526962894484810	141
+141	-4962511944791919861	141
+141	42	141
+141	6082409991708653871	141
+142	-7241526962894484810	142
+142	-4962511944791919861	142
+142	42	142
+142	6082409991708653871	142
+143	-7241526962894484810	143
+143	-4962511944791919861	143
+143	42	143
+143	6082409991708653871	143
+144	-7241526962894484810	144
+144	-4962511944791919861	144
+144	42	144
+144	6082409991708653871	144
+145	-7241526962894484810	145
+145	-4962511944791919861	145
+145	42	145
+145	6082409991708653871	145
+146	-7241526962894484810	146
+146	-4962511944791919861	146
+146	42	146
+146	6082409991708653871	146
+148	-7241526962894484810	148
+148	-4962511944791919861	148
+148	42	148
+148	6082409991708653871	148
+149	-7241526962894484810	149
+149	-4962511944791919861	149
+149	42	149
+149	6082409991708653871	149
+150	-7241526962894484810	150
+150	-4962511944791919861	150
+150	42	150
+150	6082409991708653871	150
+151	-7241526962894484810	151
+151	-4962511944791919861	151
+151	42	151
+151	6082409991708653871	151
+153	-7241526962894484810	153
+153	-4962511944791919861	153
+153	42	153
+153	6082409991708653871	153
+154	-7241526962894484810	154
+154	-4962511944791919861	154
+154	42	154
+154	6082409991708653871	154
+155	-7241526962894484810	155
+155	-4962511944791919861	155
+155	42	155
+155	6082409991708653871	155
+158	-7241526962894484810	158
+158	-4962511944791919861	158
+158	42	158
+158	6082409991708653871	158
+159	-7241526962894484810	159
+159	-4962511944791919861	159
+159	42	159
+159	6082409991708653871	159
+160	-7241526962894484810	160
+160	-4962511944791919861	160
+160	42	160
+160	6082409991708653871	160
+162	-7241526962894484810	162
+162	-4962511944791919861	162
+162	42	162
+162	6082409991708653871	162
+164	-7241526962894484810	164
+164	-4962511944791919861	164
+164	42	164
+164	6082409991708653871	164
+165	-7241526962894484810	165
+165	-4962511944791919861	165
+165	42	165
+165	6082409991708653871	165
+166	-7241526962894484810	166
+166	-4962511944791919861	166
+166	42	166
+166	6082409991708653871	166
+167	-7241526962894484810	167
+167	-4962511944791919861	167
+167	42	167
+167	6082409991708653871	167
+168	-7241526962894484810	168
+168	-4962511944791919861	168
+168	42	168
+168	6082409991708653871	168
+169	-7241526962894484810	169
+169	-4962511944791919861	169
+169	42	169
+169	6082409991708653871	169
+171	-7241526962894484810	171
+171	-4962511944791919861	171
+171	42	171
+171	6082409991708653871	171
+172	-7241526962894484810	172
+172	-4962511944791919861	172
+172	42	172
+172	6082409991708653871	172
+173	-7241526962894484810	173
+173	-4962511944791919861	173
+173	42	173
+173	6082409991708653871	173
+174	-7241526962894484810	174
+174	-4962511944791919861	174
+174	42	174
+174	6082409991708653871	174
+175	-7241526962894484810	175
+175	-4962511944791919861	175
+175	42	175
+175	6082409991708653871	175
+176	-7241526962894484810	176
+176	-4962511944791919861	176
+176	42	176
+176	6082409991708653871	176
+177	-7241526962894484810	177
+177	-4962511944791919861	177
+177	42	177
+177	6082409991708653871	177
+178	-7241526962894484810	178
+178	-4962511944791919861	178
+178	42	178
+178	6082409991708653871	178
+180	-7241526962894484810	180
+180	-4962511944791919861	180
+180	42	180
+180	6082409991708653871	180
+182	-7241526962894484810	182
+182	-4962511944791919861	182
+182	42	182
+182	6082409991708653871	182
+183	-7241526962894484810	183
+183	-4962511944791919861	183
+183	42	183
+183	6082409991708653871	183
+184	-7241526962894484810	184
+184	-4962511944791919861	184
+184	42	184
+184	6082409991708653871	184
+185	-7241526962894484810	185
+185	-4962511944791919861	185
+185	42	185
+185	6082409991708653871	185
+186	-7241526962894484810	186
+186	-4962511944791919861	186
+186	42	186
+186	6082409991708653871	186
+188	-7241526962894484810	188
+188	-4962511944791919861	188
+188	42	188
+188	6082409991708653871	188
+189	-7241526962894484810	189
+189	-4962511944791919861	189
+189	42	189
+189	6082409991708653871	189
+190	-7241526962894484810	190
+190	-4962511944791919861	190
+190	42	190
+190	6082409991708653871	190
+192	-7241526962894484810	192
+192	-4962511944791919861	192
+192	42	192
+192	6082409991708653871	192
+193	-7241526962894484810	193
+193	-4962511944791919861	193
+193	42	193
+193	6082409991708653871	193
+194	-7241526962894484810	194
+194	-4962511944791919861	194
+194	42	194
+194	6082409991708653871	194
+196	-7241526962894484810	196
+196	-4962511944791919861	196
+196	42	196
+196	6082409991708653871	196
+197	-7241526962894484810	197
+197	-4962511944791919861	197
+197	42	197
+197	6082409991708653871	197
+199	-7241526962894484810	199
+199	-4962511944791919861	199
+199	42	199
+199	6082409991708653871	199
+
diff --git a/regression-test/data/query_p0/join/rqg/doris9161/doris9161.out b/regression-test/data/query_p0/join/rqg/doris9161/doris9161.out
new file mode 100644
index 00000000000..809126e9b3a
--- /dev/null
+++ b/regression-test/data/query_p0/join/rqg/doris9161/doris9161.out
@@ -0,0 +1,27 @@
+-- This file is automatically generated. You should know what you did if you want to edit this
+-- !sql --
+\N	\N	10
+\N		19
+\N	a	12
+\N	did	9
+\N	e	5
+\N	on	1
+\N	q	8
+\N	what	17
+\N	yes	21
+0	\N	22
+1	\N	14
+1		3
+1	if	6
+3	\N	13
+3		23
+4	\N	2
+4	\N	11
+4	don't	7
+6		4
+6	l	18
+7	\N	16
+7	\N	20
+8	\N	15
+8	\N	24
+
diff --git a/regression-test/suites/query_p0/join/jira8317.groovy b/regression-test/suites/query_p0/join/rqg/doris8317/doris8317.groovy
similarity index 99%
rename from regression-test/suites/query_p0/join/jira8317.groovy
rename to regression-test/suites/query_p0/join/rqg/doris8317/doris8317.groovy
index a2b2d9ced17..eb87d3803f6 100644
--- a/regression-test/suites/query_p0/join/jira8317.groovy
+++ b/regression-test/suites/query_p0/join/rqg/doris8317/doris8317.groovy
@@ -15,7 +15,7 @@
 // specific language governing permissions and limitations
 // under the License.
 
-suite("jira8317") {
+suite("doris8317") {
     sql """
     DROP TABLE IF EXISTS `table_1000_undef_undef2`;
     """
diff --git a/regression-test/suites/query_p0/join/rqg/doris9097/doris9097.groovy b/regression-test/suites/query_p0/join/rqg/doris9097/doris9097.groovy
new file mode 100644
index 00000000000..de4a104e9ac
--- /dev/null
+++ b/regression-test/suites/query_p0/join/rqg/doris9097/doris9097.groovy
@@ -0,0 +1,69 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+suite("doris9097") {
+    sql """
+    DROP TABLE IF EXISTS `table_200_undef_undef`;
+    """
+    sql """
+    create table table_200_undef_undef (
+`pk` int,
+`col_bigint_undef_signed_` bigint   ,
+`col_bigint_undef_signed_2` bigint   
+) engine=olap
+distributed by hash(pk) buckets 10
+properties(
+	'replication_num' = '1');
+    """
+
+    sql """
+    DROP TABLE IF EXISTS `table_200_undef_undef2`;
+    """
+    sql """
+    create table table_200_undef_undef2 (
+`pk` int,
+`col_bigint_undef_signed_` bigint   ,
+`col_bigint_undef_signed_2` bigint   
+) engine=olap
+distributed by hash(pk) buckets 10
+properties(
+	'replication_num' = '1');
+    """
+
+
+    sql """
+        insert into table_200_undef_undef values (0,-4165951762050400392,-14),(1,42,-22),(2,null,-31036),(3,55,5122904558131244484),(4,-14840,28281),(5,null,4998879),(6,5760847056946960390,-9011739143110076452),(7,-4639555,-21141),(8,69,null),(9,-33,47),(10,-2050470,-2653),(11,-4395444096438300201,-3096865741370563762),(12,-57,8933),(13,3365621276362527887,-16556),(14,null,8639540759788641439),(15,-2209385869700130743,-6471665),(16,-381175611996409568,6121677622945129007),(17,-9,16),(18, [...]
+    """
+
+    sql """
+        
+insert into table_200_undef_undef2 values (0,-83475308582731078,4757385),(1,null,5656162275530927275),(2,-4774487848194004407,null),(3,-24673,-6121245078848807710),(4,-4208481,null),(5,6661054439183727345,null),(6,69,-21866),(7,32486,-4563537065551755303),(8,792478478220715600,85),(9,-948309,null),(10,-2660395,303018125117652688),(11,-377496001318248765,17),(12,6682035843545314916,null),(13,-3300872733660321156,19151),(14,8183214633031218826,-6204508354834430039),(15,-27,-380685979347397 [...]
+    """
+
+    qt_sql """
+SELECT T1.pk AS C1,
+	T1.`col_bigint_undef_signed_2` AS C2,
+	T1.`col_bigint_undef_signed_` AS C3
+FROM table_200_undef_undef AS T1
+FULL JOIN table_200_undef_undef2 AS T2 ON T1.`col_bigint_undef_signed_2` != T2.`col_bigint_undef_signed_`
+	AND T1.`col_bigint_undef_signed_2` IN (
+		SELECT T3.`col_bigint_undef_signed_2`
+		FROM table_200_undef_undef2 AS T3
+		WHERE T1.`col_bigint_undef_signed_` <> T3.`col_bigint_undef_signed_`
+		) order by 1,2,3;
+    """
+}
\ No newline at end of file
diff --git a/regression-test/suites/query_p0/join/rqg/doris9100/doris9100.groovy b/regression-test/suites/query_p0/join/rqg/doris9100/doris9100.groovy
new file mode 100644
index 00000000000..1a6d7ebfa68
--- /dev/null
+++ b/regression-test/suites/query_p0/join/rqg/doris9100/doris9100.groovy
@@ -0,0 +1,69 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+suite("doris9100") {
+    sql """
+    DROP TABLE IF EXISTS `table_200_undef_undef`;
+    """
+    sql """
+    create table table_200_undef_undef (
+`pk` int,
+`col_bigint_undef_signed_` bigint   ,
+`col_bigint_undef_signed_2` bigint   
+) engine=olap
+distributed by hash(pk) buckets 10
+properties(
+	'replication_num' = '1');
+    """
+
+    sql """
+    DROP TABLE IF EXISTS `table_200_undef_undef2`;
+    """
+    sql """
+    create table table_200_undef_undef2 (
+`pk` int,
+`col_bigint_undef_signed_` bigint   ,
+`col_bigint_undef_signed_2` bigint   
+) engine=olap
+distributed by hash(pk) buckets 10
+properties(
+	'replication_num' = '1');
+    """
+
+
+    sql """
+        insert into table_200_undef_undef values (0,-4165951762050400392,-14),(1,42,-22),(2,null,-31036),(3,55,5122904558131244484),(4,-14840,28281),(5,null,4998879),(6,5760847056946960390,-9011739143110076452),(7,-4639555,-21141),(8,69,null),(9,-33,47),(10,-2050470,-2653),(11,-4395444096438300201,-3096865741370563762),(12,-57,8933),(13,3365621276362527887,-16556),(14,null,8639540759788641439),(15,-2209385869700130743,-6471665),(16,-381175611996409568,6121677622945129007),(17,-9,16),(18, [...]
+    """
+
+    sql """
+        
+insert into table_200_undef_undef2 values (0,-83475308582731078,4757385),(1,null,5656162275530927275),(2,-4774487848194004407,null),(3,-24673,-6121245078848807710),(4,-4208481,null),(5,6661054439183727345,null),(6,69,-21866),(7,32486,-4563537065551755303),(8,792478478220715600,85),(9,-948309,null),(10,-2660395,303018125117652688),(11,-377496001318248765,17),(12,6682035843545314916,null),(13,-3300872733660321156,19151),(14,8183214633031218826,-6204508354834430039),(15,-27,-380685979347397 [...]
+    """
+
+    qt_sql """
+        SELECT T1.pk AS C1,
+	T2.`col_bigint_undef_signed_` AS C2,
+	T1.pk AS C3
+FROM table_200_undef_undef2 AS T1
+INNER JOIN table_200_undef_undef AS T2 ON T1.`col_bigint_undef_signed_2` != T2.`col_bigint_undef_signed_`
+	AND T2.`col_bigint_undef_signed_2` IN (
+		SELECT T3.`col_bigint_undef_signed_2`
+		FROM table_200_undef_undef AS T3
+		WHERE T2.`col_bigint_undef_signed_` != T3.`col_bigint_undef_signed_`
+		) order by 1,2,3;
+    """
+}
\ No newline at end of file
diff --git a/regression-test/suites/query_p0/join/rqg/doris9161/doris9161.groovy b/regression-test/suites/query_p0/join/rqg/doris9161/doris9161.groovy
new file mode 100644
index 00000000000..19fe97ef55f
--- /dev/null
+++ b/regression-test/suites/query_p0/join/rqg/doris9161/doris9161.groovy
@@ -0,0 +1,65 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+suite("doris9161") {
+    sql """
+    DROP TABLE IF EXISTS `table_25_undef_partitions2_keys3`;
+    """
+    sql """
+    create table table_25_undef_partitions2_keys3 (
+`col_int_undef_signed` int   ,
+`col_varchar_10__undef_signed` varchar(10)   ,
+`pk` int
+) engine=olap
+distributed by hash(pk) buckets 10
+properties('replication_num' = '1');
+    """
+
+    sql """
+    DROP TABLE IF EXISTS `table_7_undef_partitions2_keys3`;
+    """
+    sql """
+    create table table_7_undef_partitions2_keys3 (
+`col_int_undef_signed` int   ,
+`col_varchar_10__undef_signed` varchar(10)   ,
+`pk` int
+) engine=olap
+distributed by hash(pk) buckets 10
+properties('replication_num' = '1');
+    """
+
+
+    sql """
+        insert into table_25_undef_partitions2_keys3(pk,col_int_undef_signed,col_varchar_10__undef_signed) values (0,4,'n'),(1,null,"on"),(2,4,null),(3,1,""),(4,6,""),(5,null,'e'),(6,1,"if"),(7,4,"don't"),(8,null,'q'),(9,null,"did"),(10,null,null),(11,4,null),(12,null,"a"),(13,3,null),(14,1,null),(15,8,null),(16,7,null),(17,null,"what"),(18,6,'l'),(19,null,""),(20,7,null),(21,null,"yes"),(22,0,null),(23,3,""),(24,8,null);
+    """
+
+    sql """
+        insert into table_7_undef_partitions2_keys3(pk,col_int_undef_signed,col_varchar_10__undef_signed) values (0,2,""),(1,null,'d'),(2,6,"like"),(3,null,"time"),(4,5,""),(5,9,""),(6,2,"a");
+    """
+
+    qt_sql """
+        SELECT *
+FROM table_25_undef_partitions2_keys3 AS t1
+WHERE NOT t1.`pk` <= 7
+    OR t1.`pk` >= 1
+    OR t1.`pk` NOT IN (
+        SELECT `pk`
+        FROM table_7_undef_partitions2_keys3 AS t2
+        WHERE t1.pk = t2.pk
+    ) order by 1,2,3;
+    """
+}
\ No newline at end of file


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