github-actions[bot] commented on code in PR #25546: URL: https://github.com/apache/doris/pull/25546#discussion_r1366273417
########## be/src/exec/tablet_info.h: ########## @@ -162,9 +165,78 @@ class VOlapTablePartitionParam { int64_t version() const { return _t_param.version; } // return true if we found this block_row in partition - bool find_partition(BlockRow* block_row, const VOlapTablePartition** partition) const; + //TODO: use virtual function to refactor it + ALWAYS_INLINE bool find_partition(vectorized::Block* block, int row, + VOlapTablePartition*& partition) const { + auto it = _is_in_partition ? _partitions_map->find(std::tuple {block, row, true}) + : _partitions_map->upper_bound(std::tuple {block, row, true}); + // for list partition it might result in default partition + if (_is_in_partition) { + partition = (it != _partitions_map->end()) ? it->second : _default_partition; + it = _partitions_map->end(); + } + if (it != _partitions_map->end() && + _part_contains(it->second, std::tuple {block, row, true})) { + partition = it->second; + } + return (partition != nullptr); + } + + ALWAYS_INLINE void find_tablets( Review Comment: warning: method 'find_tablets' can be made static [readability-convert-member-functions-to-static] ```suggestion static ALWAYS_INLINE void find_tablets( ``` be/src/exec/tablet_info.h:189: ```diff - std::map<int64_t, int64_t>* partition_tablets_buffer = nullptr) const { + std::map<int64_t, int64_t>* partition_tablets_buffer = nullptr) { ``` -- 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. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org