morningman commented on code in PR #15670:
URL: https://github.com/apache/doris/pull/15670#discussion_r1064008184
##########
be/src/vec/exec/format/table/iceberg_reader.cpp:
##########
@@ -73,29 +80,49 @@ Status IcebergTableReader::init_row_filters(const
TFileRangeDesc& range) {
return Status::OK();
}
auto& delete_file_type = table_desc.content;
- auto files = table_desc.delete_files;
+ const std::vector<TIcebergDeleteFileDesc>& files = table_desc.delete_files;
if (files.empty()) {
return Status::OK();
}
if (delete_file_type == POSITION_DELETE) {
- // position delete
- ParquetReader* parquet_reader =
(ParquetReader*)(_file_format_reader.get());
- RowRange whole_range = parquet_reader->get_whole_range();
- bool init_schema = false;
- std::vector<std::string> delete_file_col_names;
- std::vector<TypeDescriptor> delete_file_col_types;
- std::list<std::vector<int64_t>> delete_rows_list;
- delete_rows_list.resize(files.size());
- int64_t num_delete_rows = 0;
- auto delete_rows_iter = delete_rows_list.begin();
- for (auto& delete_file : files) {
- if (whole_range.last_row <= delete_file.position_lower_bound ||
- whole_range.first_row > delete_file.position_upper_bound) {
- delete_rows_iter++;
- continue;
- }
- SCOPED_TIMER(_iceberg_profile.delete_files_read_time);
- std::vector<int64_t>& delete_rows = *delete_rows_iter;
+ RETURN_IF_ERROR(_position_delete(files));
+ }
Review Comment:
Maybe we should add an `else` to return error if it is `equality delete`?
You can add this in next PR
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]