This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git

The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new e085f75a434 [opt](file-scanner) print current path when encountering 
error (#34365) (#34523)
e085f75a434 is described below

commit e085f75a4346c253573127b9e358ce0c9cad6f66
Author: Mingyu Chen <morning...@163.com>
AuthorDate: Wed May 8 14:49:03 2024 +0800

    [opt](file-scanner) print current path when encountering error (#34365) 
(#34523)
    
    bp #34365
---
 be/src/vec/exec/scan/vfile_scanner.cpp | 11 ++++++++++-
 be/src/vec/exec/scan/vfile_scanner.h   |  2 ++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/be/src/vec/exec/scan/vfile_scanner.cpp 
b/be/src/vec/exec/scan/vfile_scanner.cpp
index c4bb8e20a15..32828eaa796 100644
--- a/be/src/vec/exec/scan/vfile_scanner.cpp
+++ b/be/src/vec/exec/scan/vfile_scanner.cpp
@@ -289,6 +289,15 @@ Status VFileScanner::open(RuntimeState* state) {
     return Status::OK();
 }
 
+Status VFileScanner::_get_block_impl(RuntimeState* state, Block* block, bool* 
eof) {
+    Status st = _get_block_wrapped(state, block, eof);
+    if (!st.ok()) {
+        // add cur path in error msg for easy debugging
+        return std::move(st.prepend("cur path: " + 
get_current_scan_range_name() + ". "));
+    }
+    return st;
+}
+
 // For query:
 //                              [exist cols]  [non-exist cols]  [col from 
path]  input  output
 //                              A     B    C  D                 E
@@ -308,7 +317,7 @@ Status VFileScanner::open(RuntimeState* state) {
 // _fill_columns_from_path      -     -    -  -                 x              
  x      -
 // _fill_missing_columns        -     -    -  x                 -              
  x      -
 // _convert_to_output_block     -     -    -  -                 -              
  -      x
-Status VFileScanner::_get_block_impl(RuntimeState* state, Block* block, bool* 
eof) {
+Status VFileScanner::_get_block_wrapped(RuntimeState* state, Block* block, 
bool* eof) {
     do {
         RETURN_IF_CANCELLED(state);
         if (_cur_reader == nullptr || _cur_reader_eof) {
diff --git a/be/src/vec/exec/scan/vfile_scanner.h 
b/be/src/vec/exec/scan/vfile_scanner.h
index 60a72c3a701..bdaefc595e3 100644
--- a/be/src/vec/exec/scan/vfile_scanner.h
+++ b/be/src/vec/exec/scan/vfile_scanner.h
@@ -88,6 +88,8 @@ public:
 protected:
     Status _get_block_impl(RuntimeState* state, Block* block, bool* eof) 
override;
 
+    Status _get_block_wrapped(RuntimeState* state, Block* block, bool* eof);
+
     Status _get_next_reader();
 
     // TODO: cast input block columns type to string.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to