Happens since v25.3. I couldn't find other issue with this error message.
<Fatal> : Logical error: 'Function isNull with argument with type Nothing and default implementation for Nothing is expected to return result with type Nothing, got UInt8'.
<Fatal> : Stack trace (when copying this message, always include the lines below):
0. contrib/llvm-project/libcxx/include/__exception/exception.h:113: Poco::Exception::Exception(String const&, int) @ 0x0000000026ebe4f2
1. src/Common/Exception.cpp:119: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000001422f229
2. src/Common/Exception.h:122: DB::Exception::Exception(String&&, int, String, bool) @ 0x000000000cedbf0e
3. src/Common/Exception.h:57: DB::Exception::Exception(PreformattedMessage&&, int) @ 0x000000000cedb691
4. src/Common/Exception.h:140: DB::Exception::Exception<String, String>(int, FormatStringHelperImpl<std::type_identity<String>::type, std::type_identity<String>::type>, String&&, String&&) @ 0x000000000ceda036
5. src/Functions/IFunction.cpp:325: DB::IExecutableFunction::defaultImplementationForNothing(std::vector<DB::ColumnWithTypeAndName, std::allocator<DB::ColumnWithTypeAndName>> const&, std::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x0000000018faedbf
6. src/Functions/IFunction.cpp:340: DB::IExecutableFunction::executeWithoutLowCardinalityColumns(std::vector<DB::ColumnWithTypeAndName, std::allocator<DB::ColumnWithTypeAndName>> const&, std::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x0000000018fadeb2
7. src/Functions/IFunction.cpp:424: DB::IExecutableFunction::executeWithoutSparseColumns(std::vector<DB::ColumnWithTypeAndName, std::allocator<DB::ColumnWithTypeAndName>> const&, std::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x0000000018faf31b
8. src/Functions/IFunction.cpp:498: DB::IExecutableFunction::execute(std::vector<DB::ColumnWithTypeAndName, std::allocator<DB::ColumnWithTypeAndName>> const&, std::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x0000000018fb01a2
9. src/Functions/IFunction.cpp:513: DB::IFunctionBase::execute(std::vector<DB::ColumnWithTypeAndName, std::allocator<DB::ColumnWithTypeAndName>> const&, std::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x0000000018fb05d9
10. src/Functions/caseWithExpression.cpp:88: DB::(anonymous namespace)::FunctionCaseWithExpression::caseWhenEquals(DB::ColumnWithTypeAndName const&, DB::ColumnWithTypeAndName const&, unsigned long) const @ 0x000000000e9f273b
11. src/Functions/caseWithExpression.cpp:218: DB::(anonymous namespace)::FunctionCaseWithExpression::executeImpl(std::vector<DB::ColumnWithTypeAndName, std::allocator<DB::ColumnWithTypeAndName>> const&, std::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x000000000e9f06ee
12. src/Functions/IFunction.h:437: DB::IFunction::executeImplDryRun(std::vector<DB::ColumnWithTypeAndName, std::allocator<DB::ColumnWithTypeAndName>> const&, std::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x000000000ced92ca
13. src/Functions/IFunctionAdaptors.cpp:16: DB::FunctionToExecutableFunctionAdaptor::executeDryRunImpl(std::vector<DB::ColumnWithTypeAndName, std::allocator<DB::ColumnWithTypeAndName>> const&, std::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x0000000018fb427a
14. src/Functions/IFunction.cpp:351: DB::IExecutableFunction::executeWithoutLowCardinalityColumns(std::vector<DB::ColumnWithTypeAndName, std::allocator<DB::ColumnWithTypeAndName>> const&, std::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x0000000018fadf31
15. src/Functions/IFunction.cpp:420: DB::IExecutableFunction::executeWithoutSparseColumns(std::vector<DB::ColumnWithTypeAndName, std::allocator<DB::ColumnWithTypeAndName>> const&, std::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x0000000018faf559
16. src/Functions/IFunction.cpp:498: DB::IExecutableFunction::execute(std::vector<DB::ColumnWithTypeAndName, std::allocator<DB::ColumnWithTypeAndName>> const&, std::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x0000000018fb01a2
17. src/Interpreters/ActionsDAG.cpp:825: DB::ActionsDAG::evaluatePartialResult(std::unordered_map<DB::ActionsDAG::Node const*, DB::ColumnWithTypeAndName, std::hash<DB::ActionsDAG::Node const*>, std::equal_to<DB::ActionsDAG::Node const*>, std::allocator<std::pair<DB::ActionsDAG::Node const* const, DB::ColumnWithTypeAndName>>>&, std::vector<DB::ActionsDAG::Node const*, std::allocator<DB::ActionsDAG::Node const*>> const&, unsigned long, bool) @ 0x000000001a5617cc
18. src/Interpreters/ActionsDAG.cpp:923: DB::ActionsDAG::updateHeader(DB::Block const&) const @ 0x000000001a56060f
19. src/Processors/Transforms/ExpressionTransform.cpp:12: DB::ExpressionTransform::transformHeader(DB::Block const&, DB::ActionsDAG const&) @ 0x000000001f18e9d2
20. src/Processors/QueryPlan/ExpressionStep.cpp:38: DB::ExpressionStep::ExpressionStep(std::shared_ptr<DB::Block const>, DB::ActionsDAG) @ 0x000000001f3ec54a
21. contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:634: std::__unique_if<DB::ExpressionStep>::__unique_single std::make_unique[abi:se190107]<DB::ExpressionStep, std::shared_ptr<DB::Block const> const&, DB::ActionsDAG>(std::shared_ptr<DB::Block const> const&, DB::ActionsDAG&&) @ 0x00000000195d739d
22. src/Planner/Planner.cpp:444: DB::(anonymous namespace)::addExpressionStep(std::shared_ptr<DB::PlannerContext> const&, DB::QueryPlan&, std::shared_ptr<DB::ActionsAndProjectInputsFlag>&, DB::CorrelatedSubtrees const&, DB::SelectQueryOptions const&, String const&, std::unordered_set<std::shared_ptr<DB::FutureSet>, std::hash<std::shared_ptr<DB::FutureSet>>, std::equal_to<std::shared_ptr<DB::FutureSet>>, std::allocator<std::shared_ptr<DB::FutureSet>>>&) @ 0x000000001a8d6822
23. src/Planner/Planner.cpp:1742: DB::Planner::buildPlanForQueryNode() @ 0x000000001a8cfb4a
24. src/Planner/Planner.cpp:1402: DB::Planner::buildQueryPlanIfNeeded() @ 0x000000001a8cac93
25. src/Interpreters/InterpreterSelectQueryAnalyzer.cpp:269: DB::InterpreterSelectQueryAnalyzer::getQueryPlan() @ 0x000000001b20508d
26. src/Interpreters/executeQuery.cpp:1511: 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>>&, std::shared_ptr<DB::IAST>&, std::shared_ptr<DB::ImplicitTransactionControlExecutor>) @ 0x000000001b4eecf9
27. src/Interpreters/executeQuery.cpp:1770: DB::executeQuery(String const&, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum) @ 0x000000001b4ea7c5
28. src/Server/TCPHandler.cpp:739: DB::TCPHandler::runImpl() @ 0x000000001ee0784f
29. src/Server/TCPHandler.cpp:2740: DB::TCPHandler::run() @ 0x000000001ee216e4
30. base/poco/Net/src/TCPServerConnection.cpp:40: Poco::Net::TCPServerConnection::start() @ 0x0000000026f74dc7
31. base/poco/Net/src/TCPServerDispatcher.cpp:115: Poco::Net::TCPServerDispatcher::run() @ 0x0000000026f753a5
Describe the bug
Happens since v25.3. I couldn't find other issue with this error message.
Seen in this run: https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=19a4498e7519e036c91e14218a0e136779f1611b&name_0=MasterCI&name_1=AST%20fuzzer%20%28amd_debug%29
How to reproduce
Run Fiddle: https://fiddle.clickhouse.com/2bc8ef86-c888-41c8-9ba1-cc90fe9fbad4
Error message and/or stacktrace
Stack trace: