You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "BiteTheDDDDt (via GitHub)" <gi...@apache.org> on 2023/02/28 15:33:42 UTC
[GitHub] [doris] BiteTheDDDDt commented on a diff in pull request #17192: [Opt](exec) opt the dispose nullable column logic
BiteTheDDDDt commented on code in PR #17192:
URL: https://github.com/apache/doris/pull/17192#discussion_r1120263298
##########
be/src/vec/core/block.cpp:
##########
@@ -177,15 +177,26 @@ void Block::erase(const std::set<size_t>& positions) {
}
}
-void Block::erase(size_t position) {
- if (data.empty()) {
- LOG(FATAL) << "Block is empty";
+void Block::erase_tail(size_t start) {
+ DCHECK(start <= data.size()) << fmt::format(
+ "Position out of bound in Block::erase(), max position = {}", data.size());
+ data.erase(data.begin() + start, data.end());
+ for (auto it = index_by_name.begin(); it != index_by_name.end();) {
Review Comment:
better change it to index_by_name.erase(key) for each data erased
--
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-unsubscribe@doris.apache.org
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