Skip to content

Commit 0bb5208

Browse files
[Refactor] Split HDFS scanner context from scanner runtime
Signed-off-by: alvin-phoenix-ai <alvin.zhao@phoenixdata.ai>
1 parent 53ba468 commit 0bb5208

18 files changed

Lines changed: 956 additions & 881 deletions

be/src/exec/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,7 @@ set(EXEC_NON_PIPELINE_FILES
374374
hdfs_scanner/hdfs_scanner_parquet.cpp
375375
hdfs_scanner/hdfs_scanner_orc.cpp
376376
hdfs_scanner/hdfs_scanner_avro.cpp
377+
hdfs_scanner/hdfs_scanner_context.cpp
377378
hdfs_scanner/hdfs_scanner.cpp
378379
hdfs_scanner/jni_scanner.cpp
379380
file_scanner/avro_cpp_scanner.cpp

be/src/exec/hdfs_scanner/hdfs_scanner.cpp

Lines changed: 3 additions & 434 deletions
Large diffs are not rendered by default.

be/src/exec/hdfs_scanner/hdfs_scanner.h

Lines changed: 6 additions & 438 deletions
Large diffs are not rendered by default.

be/src/exec/hdfs_scanner/hdfs_scanner_context.cpp

Lines changed: 457 additions & 0 deletions
Large diffs are not rendered by default.

be/src/exec/hdfs_scanner/hdfs_scanner_context.h

Lines changed: 468 additions & 0 deletions
Large diffs are not rendered by default.

be/src/formats/orc/orc_chunk_reader.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include "common/stack_util.h"
3131
#include "compute_env/load_path/load_path_state_helper.h"
3232
#include "compute_env/load_path/rejected_record_writer.h"
33+
#include "exec/hdfs_scanner/hdfs_scanner_context.h"
3334
#include "exprs/cast_expr.h"
3435
#include "exprs/literal.h"
3536
#include "formats/orc/orc_mapping.h"

be/src/formats/orc/orc_chunk_reader.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
#pragma once
1616

1717
#include <boost/algorithm/string.hpp>
18+
#include <memory>
1819
#include <orc/OrcFile.hh>
1920

2021
#include "column/vectorized_fwd.h"
2122
#include "common/object_pool.h"
22-
#include "exec/hdfs_scanner/hdfs_scanner.h"
2323
#include "exprs/expr.h"
2424
#include "formats/orc/column_reader.h"
2525
#include "formats/orc/orc_mapping.h"
@@ -34,6 +34,8 @@ class ColumnStatistics;
3434
namespace starrocks {
3535
class RandomAccessFile;
3636
class RuntimeState;
37+
struct SkipRowsContext;
38+
using SkipRowsContextPtr = std::shared_ptr<SkipRowsContext>;
3739
} // namespace starrocks
3840
namespace starrocks {
3941

be/src/formats/orc/orc_input_stream.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include "formats/orc/orc_input_stream.h"
1616

1717
#include "common/config_scan_io_fwd.h"
18+
#include "exec/hdfs_scanner/hdfs_scanner_context.h"
1819
#include "exprs/cast_expr.h"
1920
#include "formats/orc/orc_mapping.h"
2021
#include "fs/fs.h"

be/src/formats/orc/orc_input_stream.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,17 @@
1414

1515
#pragma once
1616

17+
#include <atomic>
18+
#include <cstdint>
1719
#include <orc/OrcFile.hh>
20+
#include <string>
21+
#include <vector>
1822

1923
#include "cache/scan/shared_buffered_input_stream.h"
20-
#include "exec/hdfs_scanner/hdfs_scanner.h"
2124
namespace starrocks {
2225

2326
class RandomAccessFile;
27+
struct HdfsScannerStats;
2428

2529
class ORCHdfsFileStream : public orc::InputStream {
2630
public:

be/src/formats/parquet/column_chunk_reader.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#include "column/vectorized_fwd.h"
2929
#include "common/runtime_profile.h"
3030
#include "common/status.h"
31-
#include "exec/hdfs_scanner/hdfs_scanner.h"
3231
#include "formats/parquet/column_reader.h"
3332
#include "formats/parquet/encoding.h"
3433
#include "formats/parquet/level_codec.h"

0 commit comments

Comments
 (0)