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 fea9966728 [fix](parquet-orc) fix that be core dump when some columns
specified are not in the parquet or orc file (#14440)
fea9966728 is described below
commit fea9966728f3dc115e4e6abf8ae0d0a6fe9e9270
Author: Xin Liao <[email protected]>
AuthorDate: Tue Nov 22 09:10:38 2022 +0800
[fix](parquet-orc) fix that be core dump when some columns specified are
not in the parquet or orc file (#14440)
When some columns specified are not in the parquet or orc file in broker
load, _batch->num_columns() will less than _num_of_columns_from_file. It will
lead to be core dump.
To prevent be core dump, just return an error in this case.
---
be/src/vec/exec/varrow_scanner.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/be/src/vec/exec/varrow_scanner.cpp
b/be/src/vec/exec/varrow_scanner.cpp
index eb120470a5..0d8cc8d3e0 100644
--- a/be/src/vec/exec/varrow_scanner.cpp
+++ b/be/src/vec/exec/varrow_scanner.cpp
@@ -153,6 +153,12 @@ Status VArrowScanner::_init_arrow_batch_if_necessary() {
Status VArrowScanner::_init_src_block() {
size_t batch_pos = 0;
_src_block.clear();
+ if (_batch->num_columns() < _num_of_columns_from_file) {
+ LOG(WARNING) << "some cloumns not found in the file,
num_columns_obtained: "
+ << _batch->num_columns()
+ << " num_columns_required: " << _num_of_columns_from_file;
+ return Status::InvalidArgument("some cloumns not found in the file");
+ }
for (auto i = 0; i < _num_of_columns_from_file; ++i) {
SlotDescriptor* slot_desc = _src_slot_descs[i];
if (slot_desc == nullptr) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]