Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions be/src/exec/orc_scanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@
#include "runtime/runtime_state.h"
#include "runtime/tuple.h"

// orc include file didn't expose orc::TimezoneError
// we have to declare it by hand, following is the source code in orc link
// https://github.com/apache/orc/blob/84353fbfc447b06e0924024a8e03c1aaebd3e7a5/c%2B%2B/src/Timezone.hh#L104-L109
namespace orc {

class TimezoneError: public std::runtime_error {
public:
TimezoneError(const std::string& what);
TimezoneError(const TimezoneError&);
virtual ~TimezoneError() noexcept;
};

}

namespace doris {

class ORCFileStream : public orc::InputStream {
Expand Down Expand Up @@ -341,6 +355,11 @@ Status ORCScanner::get_next(Tuple* tuple, MemPool* tuple_pool, bool* eof) {
str_error << "ParseError : " << e.what();
LOG(WARNING) << str_error.str();
return Status::InternalError(str_error.str());
} catch (orc::TimezoneError& e) {
std::stringstream str_error;
str_error << "TimezoneError : " << e.what();
LOG(WARNING) << str_error.str();
return Status::InternalError(str_error.str());
}
}

Expand Down
1 change: 1 addition & 0 deletions be/src/exec/orc_scanner.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#define ORC_SCANNER_H

#include <orc/OrcFile.hh>

#include "exec/base_scanner.h"

namespace doris {
Expand Down