This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 23edb3de5a [fix](icebergv2) fix bug that delete file reader is not
opened (#16133)
23edb3de5a is described below
commit 23edb3de5ae9ec49f4d8f0720e492097b4ef8d47
Author: Mingyu Chen <[email protected]>
AuthorDate: Tue Jan 24 10:19:46 2023 +0800
[fix](icebergv2) fix bug that delete file reader is not opened (#16133)
This pr #15836 change the way to use parquet reader by first open() then
init_reader().
But we forgot to call open() for iceberg delete file, which cause coredump.
---
be/src/vec/exec/format/parquet/vparquet_reader.cpp | 4 ++++
be/src/vec/exec/format/table/iceberg_reader.cpp | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/be/src/vec/exec/format/parquet/vparquet_reader.cpp
b/be/src/vec/exec/format/parquet/vparquet_reader.cpp
index 35936364b3..7579907c1c 100644
--- a/be/src/vec/exec/format/parquet/vparquet_reader.cpp
+++ b/be/src/vec/exec/format/parquet/vparquet_reader.cpp
@@ -186,6 +186,10 @@ Status ParquetReader::init_reader(
const std::vector<std::string>& missing_column_names,
std::unordered_map<std::string, ColumnValueRangeType>*
colname_to_value_range,
VExprContext* vconjunct_ctx, bool filter_groups) {
+ if (_file_metadata == nullptr) {
+ return Status::InternalError("failed to init parquet reader, please
open reader first");
+ }
+
SCOPED_RAW_TIMER(&_statistics.parse_meta_time);
_total_groups = _t_metadata->row_groups.size();
if (_total_groups == 0) {
diff --git a/be/src/vec/exec/format/table/iceberg_reader.cpp
b/be/src/vec/exec/format/table/iceberg_reader.cpp
index 5c9f1c52cb..145c57672c 100644
--- a/be/src/vec/exec/format/table/iceberg_reader.cpp
+++ b/be/src/vec/exec/format/table/iceberg_reader.cpp
@@ -182,6 +182,10 @@ Status IcebergTableReader::_position_delete(
delete_reader.get_parsed_schema(&delete_file_col_names,
&delete_file_col_types);
init_schema = true;
}
+ create_status = delete_reader.open();
+ if (!create_status.ok()) {
+ return nullptr;
+ }
create_status = delete_reader.init_reader(delete_file_col_names,
_not_in_file_col_names,
nullptr, nullptr, false);
if (!create_status.ok()) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]