[chore](file-reader) rm unused interface from generic reader (#26205)

This commit is contained in:
Siyang Tang
2023-11-01 18:43:14 +08:00
committed by GitHub
parent f0f9c3a160
commit aafd53766b
5 changed files with 0 additions and 28 deletions

View File

@ -39,10 +39,6 @@ public:
virtual Status get_next_block(Block* block, size_t* read_rows, bool* eof) = 0;
virtual std::unordered_map<std::string, TypeDescriptor> get_name_to_type() {
std::unordered_map<std::string, TypeDescriptor> map;
return map;
}
virtual Status get_columns(std::unordered_map<std::string, TypeDescriptor>* name_to_type,
std::unordered_set<std::string>* missing_cols) {
return Status::NotSupported("get_columns is not implemented");

View File

@ -991,16 +991,6 @@ TypeDescriptor OrcReader::_convert_to_doris_type(const orc::Type* orc_type) {
}
}
std::unordered_map<std::string, TypeDescriptor> OrcReader::get_name_to_type() {
std::unordered_map<std::string, TypeDescriptor> map;
auto& root_type = _reader->getType();
for (int i = 0; i < root_type.getSubtypeCount(); ++i) {
map.emplace(_get_field_name_lower_case(&root_type, i),
_convert_to_doris_type(root_type.getSubtype(i)));
}
return map;
}
Status OrcReader::get_columns(std::unordered_map<std::string, TypeDescriptor>* name_to_type,
std::unordered_set<std::string>* missing_cols) {
auto& root_type = _reader->getType();

View File

@ -169,7 +169,6 @@ public:
int64_t size() const;
std::unordered_map<std::string, TypeDescriptor> get_name_to_type() override;
Status get_columns(std::unordered_map<std::string, TypeDescriptor>* name_to_type,
std::unordered_set<std::string>* missing_cols) override;

View File

@ -459,18 +459,6 @@ Status ParquetReader::set_fill_columns(
return Status::OK();
}
std::unordered_map<std::string, TypeDescriptor> ParquetReader::get_name_to_type() {
std::unordered_map<std::string, TypeDescriptor> map;
const auto& schema_desc = _file_metadata->schema();
std::unordered_set<std::string> column_names;
schema_desc.get_column_names(&column_names);
for (auto& name : column_names) {
auto field = schema_desc.get_column(name);
map.emplace(name, field->type);
}
return map;
}
Status ParquetReader::get_parsed_schema(std::vector<std::string>* col_names,
std::vector<TypeDescriptor>* col_types) {
RETURN_IF_ERROR(_open_file());

View File

@ -128,7 +128,6 @@ public:
int64_t size() const { return _file_reader->size(); }
std::unordered_map<std::string, TypeDescriptor> get_name_to_type() override;
Status get_columns(std::unordered_map<std::string, TypeDescriptor>* name_to_type,
std::unordered_set<std::string>* missing_cols) override;