Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
zzcclp committed Mar 12, 2025
1 parent aad64cf commit b1b3490
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
14 changes: 9 additions & 5 deletions cpp-ch/local-engine/Storages/SubstraitSource/FileReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,14 @@ std::unique_ptr<NormalFileReader> createNormalFileReader(
return input_format;
};

if (file->getFileInfo().has_iceberg())
return iceberg::IcebergReader::create(file, to_read_header_, output_header_, createInputFormat);

auto input_format = createInputFormat(to_read_header_);

if (!input_format)
return nullptr;

if (file->getFileInfo().other_const_metadata_columns_size())
{
String row_index_ids_encoded;
Expand All @@ -299,11 +307,7 @@ std::unique_ptr<NormalFileReader> createNormalFileReader(
return delta::DeltaReader::create(file, to_read_header_, output_header_, input_format, row_index_ids_encoded, row_index_filter_type);
}

if (file->getFileInfo().has_iceberg())
return iceberg::IcebergReader::create(file, to_read_header_, output_header_, createInputFormat);

auto input_format = createInputFormat(to_read_header_);
return input_format == nullptr ? nullptr : std::make_unique<NormalFileReader>(file, to_read_header_, output_header_, input_format);
return std::make_unique<NormalFileReader>(file, to_read_header_, output_header_, input_format);
}
}
std::unique_ptr<BaseReader> BaseReader::create(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

#if USE_PARQUET

#include <memory>

#include <Core/Settings.h>
#include <DataTypes/DataTypeNullable.h>
#include <Formats/FormatFactory.h>
Expand All @@ -30,7 +28,6 @@
#include <Processors/Formats/Impl/ParquetBlockInputFormat.h>
#include <Storages/Parquet/VectorizedParquetRecordReader.h>
#include <Storages/Parquet/VirtualColumnRowIndexReader.h>
#include <Common/Exception.h>
#include <Storages/SubstraitSource/Delta/DeltaParquetMeta.h>

namespace DB
Expand Down

0 comments on commit b1b3490

Please sign in to comment.