qidaye commented on a change in pull request #5529:
URL: https://github.com/apache/incubator-doris/pull/5529#discussion_r612980792



##########
File path: be/src/exec/tablet_info.cpp
##########
@@ -237,14 +255,27 @@ Status OlapTablePartitionParam::init() {
             }
         }
         _partitions.emplace_back(part);
-        _partitions_map->emplace(part->end_key, part);
+        if (t_part.__isset.in_keys) {
+            for (auto in_key : part->in_keys) {
+                _partitions_map->emplace(in_key, part);
+            }
+        } else {
+            _partitions_map->emplace(part->end_key, part);
+        }
     }
     return Status::OK();
 }
 
 bool OlapTablePartitionParam::find_tablet(Tuple* tuple, const 
OlapTablePartition** partition,
                                           uint32_t* dist_hashes) const {
-    auto it = _partitions_map->upper_bound(tuple);
+    const TOlapTablePartition& t_part = _t_param.partitions[0];

Review comment:
       Doris creates at least one partition (unpartitioned table) for the olap 
table, so here `_t_param.partitions.size() ` is at least 1, no need to worry 
about.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to