diff --git a/cpp-ch/local-engine/Storages/SubstraitSource/ORCFormatFile.cpp b/cpp-ch/local-engine/Storages/SubstraitSource/ORCFormatFile.cpp index d213342f6d76b..bce4c4d457833 100644 --- a/cpp-ch/local-engine/Storages/SubstraitSource/ORCFormatFile.cpp +++ b/cpp-ch/local-engine/Storages/SubstraitSource/ORCFormatFile.cpp @@ -67,6 +67,12 @@ FormatFile::InputFormatPtr ORCFormatFile::createInputFormat(const DB::Block & he std::back_inserter(skip_stripe_indices)); format_settings.orc.skip_stripes = std::unordered_set(skip_stripe_indices.begin(), skip_stripe_indices.end()); + + std::cout << "orc skip stripes:" << std::endl; + for (const auto & skip_strpe: format_settings.orc.skip_stripes) + std::cout << skip_strpe << std::endl; + std::cout << "read header:" << header.dumpStructure() << std::endl; + auto input_format = std::make_shared(*file_format->read_buffer, header, format_settings); file_format->input = input_format; return file_format; diff --git a/cpp-ch/local-engine/Storages/SubstraitSource/SubstraitFileSource.cpp b/cpp-ch/local-engine/Storages/SubstraitSource/SubstraitFileSource.cpp index 5b872244eab5c..03beca5cf88ab 100644 --- a/cpp-ch/local-engine/Storages/SubstraitSource/SubstraitFileSource.cpp +++ b/cpp-ch/local-engine/Storages/SubstraitSource/SubstraitFileSource.cpp @@ -26,16 +26,17 @@ #include #include #include +#include #include #include #include #include #include #include +#include #include #include #include -#include "DataTypes/DataTypesDecimal.h" namespace DB { @@ -351,6 +352,13 @@ bool NormalFileReader::pull(DB::Chunk & chunk) return false; DB::Chunk raw_chunk = input_format->input->generate(); + + const auto & raw_columns = raw_chunk.getColumns(); + for (const auto & raw_column: raw_columns) + { + debug::headColumn(raw_column, 10); + } + const size_t rows = raw_chunk.getNumRows(); if (!rows) return false; diff --git a/cpp-ch/local-engine/examples/CMakeLists.txt b/cpp-ch/local-engine/examples/CMakeLists.txt index 03cd3bfe3f193..acd5b7772c2fd 100644 --- a/cpp-ch/local-engine/examples/CMakeLists.txt +++ b/cpp-ch/local-engine/examples/CMakeLists.txt @@ -16,3 +16,6 @@ clickhouse_add_executable(signal_demo signal_demo.cpp) target_link_libraries(signal_demo PRIVATE gluten_clickhouse_backend_libs loggers) + +clickhouse_add_executable(orc_read orc_read.cpp) +target_link_libraries(orc_read PRIVATE gluten_clickhouse_backend_libs)