Skip to content

Commit e83c21e

Browse files
committed
refactor: remove unused path-based reader builder
1 parent c3b8932 commit e83c21e

7 files changed

Lines changed: 0 additions & 28 deletions

File tree

include/paimon/format/reader_builder.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#pragma once
2020

2121
#include <memory>
22-
#include <string>
2322

2423
#include "paimon/memory/memory_pool.h"
2524
#include "paimon/reader/file_batch_reader.h"
@@ -38,9 +37,6 @@ class PAIMON_EXPORT ReaderBuilder {
3837
/// Build a file batch reader based on the created `InputStream`.
3938
virtual Result<std::unique_ptr<FileBatchReader>> Build(
4039
const std::shared_ptr<InputStream>& path) const = 0;
41-
42-
/// Build a file batch reader based on the file path.
43-
virtual Result<std::unique_ptr<FileBatchReader>> Build(const std::string& path) const = 0;
4440
};
4541

4642
} // namespace paimon

src/paimon/common/reader/prefetch_file_batch_reader_impl_test.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,6 @@ class ControlledMockFormatReaderBuilder : public ReaderBuilder {
100100
data_, schema_, read_batch_size_, read_ranges_, need_prefetch_, set_read_ranges_status);
101101
}
102102

103-
Result<std::unique_ptr<FileBatchReader>> Build(const std::string& path) const override {
104-
return Status::Invalid("do not support build reader with path in mock format");
105-
}
106-
107103
private:
108104
std::shared_ptr<arrow::Array> data_;
109105
std::shared_ptr<arrow::DataType> schema_;

src/paimon/format/avro/avro_reader_builder.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@ class AvroReaderBuilder : public ReaderBuilder {
4747
return AvroFileBatchReader::Create(path, batch_size_, pool_);
4848
}
4949

50-
Result<std::unique_ptr<FileBatchReader>> Build(const std::string& path) const override {
51-
return Status::Invalid("do not support build reader with path in avro format");
52-
}
53-
5450
private:
5551
const int32_t batch_size_;
5652
std::shared_ptr<MemoryPool> pool_;

src/paimon/format/blob/blob_reader_builder.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@ class BlobReaderBuilder : public ReaderBuilder {
4848
return BlobFileBatchReader::Create(input_stream, batch_size_, blob_as_descriptor, pool_);
4949
}
5050

51-
Result<std::unique_ptr<FileBatchReader>> Build(const std::string& path) const override {
52-
return Status::Invalid("do not support build reader with path in blob format");
53-
}
54-
5551
private:
5652
int32_t batch_size_;
5753
std::shared_ptr<MemoryPool> pool_;

src/paimon/format/orc/orc_reader_builder.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,6 @@ class OrcReaderBuilder : public ReaderBuilder {
5454
return OrcFileBatchReader::Create(std::move(input_stream), pool_, options_, batch_size_);
5555
}
5656

57-
Result<std::unique_ptr<FileBatchReader>> Build(const std::string& path) const override {
58-
return Status::Invalid("do not support build reader with path in orc format");
59-
}
60-
6157
private:
6258
int32_t batch_size_ = -1;
6359
std::shared_ptr<MemoryPool> pool_;

src/paimon/format/parquet/parquet_reader_builder.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,6 @@ class ParquetReaderBuilder : public ReaderBuilder {
5353
batch_size_);
5454
}
5555

56-
Result<std::unique_ptr<FileBatchReader>> Build(const std::string& path) const override {
57-
return Status::Invalid("do not support build reader with path in parquet format");
58-
}
59-
6056
private:
6157
int32_t batch_size_ = -1;
6258
std::shared_ptr<MemoryPool> pool_;

src/paimon/testing/mock/mock_format_reader_builder.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,6 @@ class MockFormatReaderBuilder : public ReaderBuilder {
5454
return std::make_unique<MockFileBatchReader>(data_, schema_, read_batch_size_);
5555
}
5656

57-
Result<std::unique_ptr<FileBatchReader>> Build(const std::string& path) const override {
58-
return Status::Invalid("do not support build reader with path in mock format");
59-
}
60-
6157
private:
6258
std::shared_ptr<arrow::Array> data_;
6359
std::shared_ptr<arrow::DataType> schema_;

0 commit comments

Comments
 (0)