You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2021/04/14 06:49:47 UTC

[GitHub] [incubator-doris] qidaye commented on a change in pull request #5529: [Feature] add list partition support

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:
users@infra.apache.org



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