Skip to content

Iceberg Logical error: 'PREWHERE passed to format that doesn't support it' #96829

Closed

Description

@PedroTadim

Describe the bug

Pushing a PREWHERE condition into an ORC Iceberg table.

How to reproduce

Run spark.py
Then in ClickHouse:

CREATE TABLE t0 ENGINE = IcebergLocal(local, path = '/var/lib/clickhouse/user_files/lakehouses/t0/test/t0');
ALTER TABLE t0 DELETE WHERE c0;

Error message and/or stacktrace

Stack trace:

<Fatal> : Logical error: 'PREWHERE passed to format that doesn't support it'.
<Fatal> : Format string: '{} passed to format that doesn't support it'.
<Fatal> : Stack trace (when copying this message, always include the lines below):

0. contrib/llvm-project/libcxx/include/__exception/exception.h:113:14: Poco::Exception::Exception(String const&, int) @ 0x00000000267da572
1. src/Common/Exception.cpp:136:7: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x00000000164f6d29
2. src/Common/Exception.h:172:100: DB::Exception::Exception(String&&, int, String, bool) @ 0x000000000db8ced4
3. src/Common/Exception.h:58:54: DB::Exception::Exception(PreformattedMessage&&, int) @ 0x000000000db8c9d1
4. src/Common/Exception.h:190:77: DB::Exception::Exception<char const*>(int, FormatStringHelperImpl<std::type_identity<char const*>::type>, char const*&&) @ 0x0000000012415043
5. src/Formats/FormatFactory.cpp:439:15: DB::FormatFactory::getInput(String const&, DB::ReadBuffer&, DB::Block const&, std::shared_ptr<DB::Context const> const&, unsigned long, std::optional<DB::FormatSettings> const&, std::shared_ptr<DB::FormatParserSharedResources>, std::shared_ptr<DB::FormatFilterInfo>, bool, DB::CompressionMethod, bool, std::optional<unsigned long> const&, std::optional<unsigned long> const&, std::optional<unsigned long> const&) const @ 0x000000002021633b
6. src/Storages/ObjectStorage/StorageObjectStorageSource.cpp:644:55: DB::StorageObjectStorageSource::createReader(unsigned long, std::shared_ptr<DB::IObjectIterator> const&, std::shared_ptr<DB::StorageObjectStorageConfiguration> const&, std::shared_ptr<DB::IObjectStorage> const&, DB::ReadFromFormatInfo&, std::optional<DB::FormatSettings> const&, std::shared_ptr<DB::Context const> const&, DB::SchemaCache*, std::shared_ptr<Poco::Logger> const&, unsigned long, std::shared_ptr<DB::FormatParserSharedResources>, std::shared_ptr<DB::FormatFilterInfo>, bool) @ 0x000000001ab2ce15
7. src/Storages/ObjectStorage/StorageObjectStorageSource.cpp:499:12: DB::StorageObjectStorageSource::lazyInitialize() @ 0x000000001ab295e4
8. src/Storages/ObjectStorage/StorageObjectStorageSource.cpp:327:5: DB::StorageObjectStorageSource::generate() @ 0x000000001ab29a34
9. src/Processors/ISource.cpp:144:18: DB::ISource::tryGenerate() @ 0x00000000202abf2a
10. src/Processors/ISource.cpp:110:26: DB::ISource::work() @ 0x00000000202abc01
11. src/Processors/Executors/ExecutionThreadContext.cpp:53:26: DB::ExecutionThreadContext::executeTask() @ 0x00000000202c82f0
12. src/Processors/Executors/PipelineExecutor.cpp:351:26: DB::PipelineExecutor::executeStepImpl(unsigned long, DB::IAcquiredSlot*, std::atomic<bool>*) @ 0x00000000202ba438
13. src/Processors/Executors/PipelineExecutor.cpp:179:5: DB::PipelineExecutor::executeStep(std::atomic<bool>*) @ 0x00000000202b9fcd
14. src/Processors/Executors/PullingPipelineExecutor.cpp:59:20: DB::PullingPipelineExecutor::pull(DB::Chunk&) @ 0x00000000202d1474
15. src/Processors/Executors/PullingPipelineExecutor.cpp:70:10: DB::PullingPipelineExecutor::pull(DB::Block&) @ 0x00000000202d1604
16. src/Storages/ObjectStorage/DataLakes/Iceberg/Mutations.cpp:161:25: DB::Iceberg::writeDataFiles(DB::MutationCommands const&, std::shared_ptr<DB::Context const>, std::shared_ptr<DB::StorageInMemoryMetadata const>, DB::StorageID, std::shared_ptr<DB::IObjectStorage>, String, DB::FileNamesGenerator&, std::optional<DB::FormatSettings> const&, std::optional<DB::ChunkPartitioner>&, Poco::SharedPtr<Poco::JSON::Object, Poco::ReferenceCounter, Poco::ReleasePolicy<Poco::JSON::Object>>, String const&) @ 0x000000001acc7bc7
17. src/Storages/ObjectStorage/DataLakes/Iceberg/Mutations.cpp:600:31: DB::Iceberg::mutate(DB::MutationCommands const&, std::shared_ptr<DB::Context const>, std::shared_ptr<DB::StorageInMemoryMetadata const>, DB::StorageID, std::shared_ptr<DB::IObjectStorage>, DB::DataLakeStorageSettings const&, DB::Iceberg::PersistentTableComponents&, String const&, std::optional<DB::FormatSettings> const&, std::shared_ptr<DataLake::ICatalog>, String const&, String const&) @ 0x000000001acc5c81
18. src/Storages/ObjectStorage/DataLakes/Iceberg/IcebergMetadata.cpp:502:5: DB::IcebergMetadata::mutate(DB::MutationCommands const&, std::shared_ptr<DB::StorageObjectStorageConfiguration>, std::shared_ptr<DB::Context const>, DB::StorageID const&, std::shared_ptr<DB::StorageInMemoryMetadata const>, std::shared_ptr<DataLake::ICatalog>, std::optional<DB::FormatSettings> const&) @ 0x000000001ac4b7da
19. src/Storages/ObjectStorage/DataLakes/DataLakeConfiguration.h:148:27: DB::DataLakeConfiguration<DB::StorageLocalConfiguration, DB::IcebergMetadata>::mutate(DB::MutationCommands const&, std::shared_ptr<DB::Context const>, DB::StorageID const&, std::shared_ptr<DB::StorageInMemoryMetadata const>, std::shared_ptr<DataLake::ICatalog>, std::optional<DB::FormatSettings> const&) @ 0x0000000018bdddf6
20. src/Storages/ObjectStorage/StorageObjectStorage.cpp:712:20: DB::StorageObjectStorage::mutate(DB::MutationCommands const&, std::shared_ptr<DB::Context const>) @ 0x000000001aae3b47
21. src/Interpreters/InterpreterAlterQuery.cpp:344:16: DB::InterpreterAlterQuery::executeToTable(DB::ASTAlterQuery const&) @ 0x000000001c6ace57
22. src/Interpreters/InterpreterAlterQuery.cpp:87:16: DB::InterpreterAlterQuery::execute() @ 0x000000001c6a9152
23. src/Interpreters/executeQuery.cpp:1742:40: DB::executeQueryImpl(char const*, char const*, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum, std::unique_ptr<DB::ReadBuffer, std::default_delete<DB::ReadBuffer>>&, boost::intrusive_ptr<DB::IAST>&, std::shared_ptr<DB::ImplicitTransactionControlExecutor>, std::function<void ()>, DB::QueryResultDetails&) @ 0x000000001caa09b8
24. src/Interpreters/executeQuery.cpp:1970:11: DB::executeQuery(String const&, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum) @ 0x000000001ca9b2e3
25. src/Server/TCPHandler.cpp:788:68: DB::TCPHandler::runImpl() @ 0x00000000201a42d8
26. src/Server/TCPHandler.cpp:2890:9: DB::TCPHandler::run() @ 0x00000000201bfda4
27. base/poco/Net/src/TCPServerConnection.cpp:40:3: Poco::Net::TCPServerConnection::start() @ 0x0000000026890d0e
28. base/poco/Net/src/TCPServerDispatcher.cpp:115:42: Poco::Net::TCPServerDispatcher::run() @ 0x0000000026891352
29. base/poco/Foundation/src/ThreadPool.cpp:205:14: Poco::PooledThread::run() @ 0x0000000026830fff
30. base/poco/Foundation/src/Thread_POSIX.cpp:341:27: Poco::ThreadImpl::runnableEntry(void*) @ 0x000000002682e68f
31. start_thread @ 0x000000000009caa4

Version info

Activity

  1. added
    bug
    fuzz
    comp-datalake
    on Feb 13, 2026
  2. added a commit that references this issue on Mar 30, 2026
    1982068
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugcomp-datalakefuzz

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions