Skip to content

Logical error: Cannot convert nested result of function A with type B to the expected result type C: D (STID: 4827-671c) #93960

@davenger

Description

@davenger

Important: This issue was automatically generated and is used by CI for matching failures. DO NOT modify the body content. DO NOT remove labels.

Test name: Logical error: Cannot convert nested result of function A with type B to the expected result type C: D (STID: 4827-671c)
CI report: AST fuzzer (amd_debug)
Failing test history: cidb

Test output:

Error:
Logical error: 'Cannot convert nested result of function multiply with type LowCardinality(UInt16) to the expected result type Variant(Array(Array(Array(Array(Float64)))), Array(Array(Array(Array(Int128)))), Array(Array(Array(Float64))), Array(Array(Float32)), Array(Array(Float64)), Array(Array(UInt32)), Array(Decimal(18, 12)), Array(Decimal(76, 64)), Array(Decimal(9, 2)), Array(Float32), Array(Float64), Array(Int128), Array(Int32), Array(Int64), Array(UInt16), Array(UInt32), Array(UInt64), Decimal(38, 32), Float64, Int32, Int64, Tuple(), UInt16, UInt32, UInt64): Cannot convert type LowCardinality(UInt16) to Variant(Array(Array(Array(Array(Float64)))), Array(Array(Array(Array(Int128)))), Array(Array(Array(Float64))), Array(Array(Float32)), Array(Array(Float64)), Array(Array(UInt32)), Array(Decimal(18, 12)), Array(Decimal(76, 64)), Array(Decimal(9, 2)), Array(Float32), Array(Float64), Array(Int128), Array(Int32), Array(Int64), Array(UInt16), Array(UInt32), Array(UInt64), Decimal(38, 32), Float64, Int32, Int64, Tuple(), UInt16, UInt32, UInt64). Conversion to Variant allowed only for types from this Variant'.
---

Failed query:
SELECT 'aaa', x * 2 AS x_2, y * 3 AS y_3 FROM merge(currentDatabase(), '02763_merge') WHERE x > 2 ORDER BY x_2 ASC SETTINGS optimize_move_to_prewhere = 0
---

Reproduce commands (auto-generated; may require manual adjustment):
SELECT 'aaa', x * 2 AS x_2, y * 3 AS y_3 FROM merge(currentDatabase(), '02763_merge') WHERE x > 2 ORDER BY x_2 ASC SETTINGS optimize_move_to_prewhere = 0
DROP TABLE IF EXISTS merge(currentDatabase(), '02763_merge')
---

Stack trace:
pthread_kill @ 0x00000000000969fd
gsignal @ 0x0000000000042476
__lgamma_r_finite@GLIBC_2.15 @ 0x00000000000287f3
src/Common/Exception.cpp:57: DB::abortOnFailedAssertion(String const&, std::basic_string_view<char, std::char_traits<char>>, void* const*, unsigned long, unsigned long) @ 0x00000000163e623c
src/Common/Exception.cpp:90: DB::handle_error_code(String const&, std::basic_string_view<char, std::char_traits<char>>, int, bool, std::vector<void*, std::allocator<void*>> const&) @ 0x00000000163e764d
src/Common/Exception.cpp:143: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x00000000163e7939
src/Common/Exception.h:172: DB::Exception::Exception(String&&, int, String, bool) @ 0x000000000d9d7014
src/Common/Exception.h:58: DB::Exception::Exception(PreformattedMessage&&, int) @ 0x000000000d9d6b11
src/Common/Exception.h:190: DB::Exception::Exception<String, String, String, String const&>(int, FormatStringHelperImpl<std::type_identity<String>::type, std::type_identity<String>::type, std::type_identity<String>::type, std::type_identity<String const&>::type>, String&&, String&&, String&&, String const&) @ 0x000000001a1b16ce
src/Functions/FunctionVariantAdaptor.cpp:136: DB::ExecutableFunctionVariantAdaptor::executeImpl(std::vector<DB::ColumnWithTypeAndName, std::allocator<DB::ColumnWithTypeAndName>> const&, std::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x000000001a1b9219
src/Functions/FunctionVariantAdaptor.cpp:603: DB::ExecutableFunctionVariantAdaptor::executeImpl(std::vector<DB::ColumnWithTypeAndName, std::allocator<DB::ColumnWithTypeAndName>> const&, std::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x000000001a1b9c4c
src/Functions/IFunction.cpp:355: DB::IExecutableFunction::executeWithoutLowCardinalityColumns(std::vector<DB::ColumnWithTypeAndName, std::allocator<DB::ColumnWithTypeAndName>> const&, std::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x000000001a1a5781
src/Functions/IFunction.cpp:432: DB::IExecutableFunction::executeWithoutSparseColumns(std::vector<DB::ColumnWithTypeAndName, std::allocator<DB::ColumnWithTypeAndName>> const&, std::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x000000001a1a6c62
src/Functions/IFunction.cpp:575: DB::IExecutableFunction::executeWithoutReplicatedColumns(std::vector<DB::ColumnWithTypeAndName, std::allocator<DB::ColumnWithTypeAndName>> const&, std::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x000000001a1a7f48
src/Functions/IFunction.cpp:476: DB::IExecutableFunction::execute(std::vector<DB::ColumnWithTypeAndName, std::allocator<DB::ColumnWithTypeAndName>> const&, std::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x000000001a1a7b61
src/Interpreters/ExpressionActions.cpp:693: DB::executeAction(DB::ExpressionActions::Action const&, DB::(anonymous namespace)::ExecutionContext&, bool, bool, bool)
src/Interpreters/ExpressionActions.cpp:836: DB::ExpressionActions::execute(DB::Block&, unsigned long&, bool, bool) const @ 0x000000001c6c10e1
src/Processors/Transforms/ExpressionTransform.cpp:30: DB::ExpressionTransform::transform(DB::Chunk&) @ 0x00000000207cc559
src/Processors/ISimpleTransform.h:33: DB::ISimpleTransform::transform(DB::Chunk&, DB::Chunk&) @ 0x0000000018d99253
src/Processors/ISimpleTransform.cpp:100: DB::ISimpleTransform::work() @ 0x00000000204f628a
src/Processors/Executors/ExecutionThreadContext.cpp:53: DB::executeJob(DB::ExecutingGraph::Node*, DB::ReadProgressCallback*)
src/Processors/Executors/ExecutionThreadContext.cpp:102: DB::ExecutionThreadContext::executeTask() @ 0x0000000020514930
src/Processors/Executors/PipelineExecutor.cpp:351: DB::PipelineExecutor::executeStepImpl(unsigned long, DB::IAcquiredSlot*, std::atomic<bool>*) @ 0x0000000020506b78
src/Processors/Executors/PipelineExecutor.cpp:279: DB::PipelineExecutor::executeSingleThread(unsigned long, DB::IAcquiredSlot*) @ 0x00000000205071ac
src/Processors/Executors/PipelineExecutor.cpp:565: operator()
contrib/llvm-project/libcxx/include/__type_traits/invoke.h:87: std::__invoke_result_impl<void, DB::PipelineExecutor::spawnThreads(std::shared_ptr<DB::IAcquiredSlot>)::$_0&>::type std::__invoke[abi:se210105]<DB::PipelineExecutor::spawnThreads(std::shared_ptr<DB::IAcquiredSlot>)::$_0&>(DB::PipelineExecutor::spawnThreads(std::shared_ptr<DB::IAcquiredSlot>)::$_0&)
contrib/llvm-project/libcxx/include/__type_traits/invoke.h:342: void std::__invoke_void_return_wrapper<void, true>::__call[abi:se210105]<DB::PipelineExecutor::spawnThreads(std::shared_ptr<DB::IAcquiredSlot>)::$_0&>(DB::PipelineExecutor::spawnThreads(std::shared_ptr<DB::IAcquiredSlot>)::$_0&)
contrib/llvm-project/libcxx/include/__type_traits/invoke.h:348: void std::__invoke_r[abi:se210105]<void, DB::PipelineExecutor::spawnThreads(std::shared_ptr<DB::IAcquiredSlot>)::$_0&>(DB::PipelineExecutor::spawnThreads(std::shared_ptr<DB::IAcquiredSlot>)::$_0&)
contrib/llvm-project/libcxx/include/__functional/function.h:450: ? @ 0x00000000205083ce
contrib/llvm-project/libcxx/include/__functional/function.h:508: ?
contrib/llvm-project/libcxx/include/__functional/function.h:772: ?
src/Common/ThreadPool.cpp:801: ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::worker() @ 0x0000000016536479
contrib/llvm-project/libcxx/include/__type_traits/invoke.h:0: std::__invoke_result_impl<void, void (ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::*&)(), ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool*&>::type std::__invoke[abi:se210105]<void (ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::*&)(), ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool*&>(void (ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::*&)(), ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool*&)
contrib/llvm-project/libcxx/include/tuple:1380: decltype(auto) std::__apply_tuple_impl[abi:se210105]<void (ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::*&)(), std::tuple<ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool*>&, 0ul>(void (ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::*&)(), std::tuple<ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool*>&, std::__tuple_indices<0ul>)
contrib/llvm-project/libcxx/include/tuple:1384: decltype(auto) std::apply[abi:se210105]<void (ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::*&)(), std::tuple<ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool*>&>(void (ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::*&)(), std::tuple<ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool*>&)
src/Common/ThreadPool.h:312: ThreadFromGlobalPoolImpl<false, true>::ThreadFromGlobalPoolImpl<void (ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::*)(), ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool*>(void (ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool::*&&)(), ThreadPoolImpl<ThreadFromGlobalPoolImpl<false, true>>::ThreadFromThreadPool*&&)::'lambda'()::operator()() @ 0x000000001653c868
contrib/llvm-project/libcxx/include/__functional/function.h:508: ?
contrib/llvm-project/libcxx/include/__functional/function.h:772: ?
src/Common/ThreadPool.cpp:811: ThreadPoolImpl<std::thread>::ThreadFromThreadPool::worker() @ 0x0000000016533983
contrib/llvm-project/libcxx/include/__type_traits/invoke.h:0: std::__invoke_result_impl<void, void (ThreadPoolImpl<std::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::thread>::ThreadFromThreadPool*>::type std::__invoke[abi:se210105]<void (ThreadPoolImpl<std::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::thread>::ThreadFromThreadPool*>(void (ThreadPoolImpl<std::thread>::ThreadFromThreadPool::*&&)(), ThreadPoolImpl<std::thread>::ThreadFromThreadPool*&&)
contrib/llvm-project/libcxx/include/__thread/thread.h:159: void std::__thread_execute[abi:se210105]<std::unique_ptr<std::__thread_struct, std::default_delete<std::__thread_struct>>, void (ThreadPoolImpl<std::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::thread>::ThreadFromThreadPool*, 2ul>(std::tuple<std::unique_ptr<std::__thread_struct, std::default_delete<std::__thread_struct>>, void (ThreadPoolImpl<std::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::thread>::ThreadFromThreadPool*>&, std::__tuple_indices<2ul>)
contrib/llvm-project/libcxx/include/__thread/thread.h:168: void* std::__thread_proxy[abi:se210105]<std::tuple<std::unique_ptr<std::__thread_struct, std::default_delete<std::__thread_struct>>, void (ThreadPoolImpl<std::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::thread>::ThreadFromThreadPool*>>(void*) @ 0x000000001653a50e
start_thread @ 0x0000000000094ac3
clone3 @ 0x00000000001268c0

Metadata

Metadata

Assignees

Labels

fuzzProblem found by one of the fuzzerstestingSpecial issue with list of bugs found by CI

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions