Error:
Logical error: 'Column __text_index_idx_hasToken_55f6a26b032e423b9e4a3c2172b24526 already added for reading'.
---
Failed query:
SELECT trimBoth(explain) FROM (SELECT * FROM viewExplain('EXPLAIN', 'actions = 1', (SELECT DISTINCT 'Test hasToken + length(text):' FROM tab__fuzz_2 PREWHERE ((1 > length(text)) OR hasToken(text, toNu...
---
Reproduce commands (auto-generated; may require manual adjustment):
CREATE TABLE tab__fuzz_2 (`k` Float64, `text` String, INDEX idx text TYPE text(tokenizer = 'splitByNonAlpha') GRANULARITY 1) ENGINE = MergeTree ORDER BY k SETTINGS index_granularity = 2, index_granula...
CREATE TABLE tab__fuzz_2 (`k` Float64, `text` String, INDEX idx text TYPE text(tokenizer = 'splitByNonAlpha') GRANULARITY 1) ENGINE = MergeTree ORDER BY k SETTINGS index_granularity = 2, index_granula...
SELECT trimBoth(explain) FROM (SELECT * FROM viewExplain('EXPLAIN', 'actions = 1', (SELECT DISTINCT 'Test hasToken + length(text):' FROM tab__fuzz_2 PREWHERE ((1 > length(text)) OR hasToken(text, toNu...
DROP TABLE IF EXISTS viewExplain
DROP TABLE IF EXISTS tab__fuzz_2
---
Stack trace:
__pthread_kill_implementation @ 0x0000000000082009
raise @ 0x000000000003a83c
abort @ 0x0000000000027134
src/Common/Exception.cpp:54: DB::abortOnFailedAssertion(String const&, std::basic_string_view<char, std::char_traits<char>>, void* const*, unsigned long, unsigned long) @ 0x000000001dc6c3f4
src/Common/Exception.cpp:87: DB::handle_error_code(String const&, std::basic_string_view<char, std::char_traits<char>>, int, bool, std::vector<void*, std::allocator<void*>> const&) @ 0x000000001dc6d89...
src/Common/Exception.cpp:138: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000001dc6de54
DB::Exception::Exception(String&&, int, String, bool) @ 0x000000000f0e6fdc
DB::Exception::Exception(PreformattedMessage&&, int) @ 0x000000000f0e630c
DB::Exception::Exception<String const&>(int, FormatStringHelperImpl<std::type_identity<String const&>::type>, String const&) @ 0x000000000f106220
src/Processors/QueryPlan/ReadFromMergeTree.cpp:3676: DB::ReadFromMergeTree::createReadTasksForTextIndex(DB::UsefulSkipIndexes const&, std::unordered_map<String, DB::NamesAndTypesList, std::hash<String...
src/Processors/QueryPlan/Optimizations/optimizeDirectReadFromTextIndex.cpp:342: DB::QueryPlanOptimizations::applyTextIndexDirectReadToDAG(DB::ReadFromMergeTree*, DB::ActionsDAG&, absl::lts_20250512::f...
src/Processors/QueryPlan/Optimizations/optimizeDirectReadFromTextIndex.cpp:422: DB::QueryPlanOptimizations::optimizePrewhereDirectReadFromTextIndex(std::vector<DB::QueryPlanOptimizations::Frame, std::...
src/Processors/QueryPlan/Optimizations/optimizeDirectReadFromTextIndex.cpp:446: DB::QueryPlanOptimizations::optimizeDirectReadFromTextIndex(std::vector<DB::QueryPlanOptimizations::Frame, std::allocato...
src/Processors/QueryPlan/Optimizations/optimizeTree.cpp:485: DB::QueryPlanOptimizations::optimizeTreeSecondPass(DB::QueryPlanOptimizationSettings const&, DB::QueryPlan::Node&, std::list<DB::QueryPlan:...
src/Processors/QueryPlan/QueryPlan.cpp:583: DB::QueryPlan::optimize(DB::QueryPlanOptimizationSettings const&) @ 0x0000000034023500
src/Interpreters/InterpreterExplainQuery.cpp:589: DB::InterpreterExplainQuery::executeImpl() @ 0x000000002b385e34
src/Interpreters/InterpreterExplainQuery.cpp:144: DB::InterpreterExplainQuery::execute() @ 0x000000002b3845c8
src/TableFunctions/TableFunctionExplain.cpp:183: DB::(anonymous namespace)::TableFunctionExplain::executeImpl(std::shared_ptr<DB::IAST> const&, std::shared_ptr<DB::Context const>, String const&, DB::C...
src/TableFunctions/ITableFunction.cpp:57: DB::ITableFunction::execute(std::shared_ptr<DB::IAST> const&, std::shared_ptr<DB::Context const>, String const&, DB::ColumnsDescription, bool, bool) const @ 0...
src/Interpreters/Context.cpp:2762: DB::Context::executeTableFunction(std::shared_ptr<DB::IAST> const&, std::shared_ptr<DB::ITableFunction> const&) @ 0x000000002af6ab84
src/Analyzer/Resolve/QueryAnalyzer.cpp:4067: DB::QueryAnalyzer::resolveTableFunction(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&, DB::QueryExpressionsAliasVisitor&, bool) @ 0x000...
src/Analyzer/Resolve/QueryAnalyzer.cpp:4573: DB::QueryAnalyzer::resolveQueryJoinTreeNode(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&, DB::QueryExpressionsAliasVisitor&) @ 0x00000...
src/Analyzer/Resolve/QueryAnalyzer.cpp:4837: DB::QueryAnalyzer::resolveQuery(std::shared_ptr<DB::IQueryTreeNode> const&, DB::IdentifierResolveScope&) @ 0x0000000029ab2034
src/Analyzer/Resolve/QueryAnalyzer.cpp:2927: DB::QueryAnalyzer::resolveExpressionNode(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&, bool, bool, bool) @ 0x0000000029abbd6c
src/Analyzer/Resolve/QueryAnalyzer.cpp:4565: DB::QueryAnalyzer::resolveQueryJoinTreeNode(std::shared_ptr<DB::IQueryTreeNode>&, DB::IdentifierResolveScope&, DB::QueryExpressionsAliasVisitor&) @ 0x00000...
src/Analyzer/Resolve/QueryAnalyzer.cpp:4837: DB::QueryAnalyzer::resolveQuery(std::shared_ptr<DB::IQueryTreeNode> const&, DB::IdentifierResolveScope&) @ 0x0000000029ab2034
src/Analyzer/Resolve/QueryAnalyzer.cpp:138: DB::QueryAnalyzer::resolve(std::shared_ptr<DB::IQueryTreeNode>&, std::shared_ptr<DB::IQueryTreeNode> const&, std::shared_ptr<DB::Context const>) @ 0x0000000...
src/Analyzer/Resolve/QueryAnalysisPass.cpp:18: DB::QueryAnalysisPass::run(std::shared_ptr<DB::IQueryTreeNode>&, std::shared_ptr<DB::Context const>) @ 0x0000000029aae7f4
src/Analyzer/QueryTreePassManager.cpp:194: DB::QueryTreePassManager::run(std::shared_ptr<DB::IQueryTreeNode>&) @ 0x0000000029b5834c
src/Interpreters/InterpreterSelectQueryAnalyzer.cpp:170: DB::buildQueryTreeAndRunPasses(std::shared_ptr<DB::IAST> const&, DB::SelectQueryOptions const&, std::shared_ptr<DB::Context const> const&, std:...
src/Interpreters/InterpreterSelectQueryAnalyzer.cpp:184: DB::InterpreterSelectQueryAnalyzer::InterpreterSelectQueryAnalyzer(std::shared_ptr<DB::IAST> const&, std::shared_ptr<DB::Context const> const&,...
./contrib/llvm-project/libcxx/include/__memory/unique_ptr.h:759: std::unique_ptr<DB::InterpreterSelectQueryAnalyzer, std::default_delete<DB::InterpreterSelectQueryAnalyzer>> std::make_unique[abi:ne210...
inlined from ./contrib/llvm-project/libcxx/include/__functional/function.h:508: ?
inlined from ./contrib/llvm-project/libcxx/include/__functional/function.h:772: ?
src/Interpreters/InterpreterFactory.cpp:408: DB::InterpreterFactory::get(std::shared_ptr<DB::IAST>&, std::shared_ptr<DB::Context>, DB::SelectQueryOptions const&) @ 0x000000002b3a6bb8
src/Interpreters/executeQuery.cpp:1677: DB::executeQueryImpl(char const*, char const*, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum, std::unique_ptr<DB::ReadBuffer, std...
src/Interpreters/executeQuery.cpp:1959: DB::executeQuery(String const&, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum) @ 0x000000002baaac3c
src/Server/TCPHandler.cpp:776: DB::TCPHandler::runImpl() @ 0x000000003333394c
src/Server/TCPHandler.cpp:2866: DB::TCPHandler::run() @ 0x000000003336aca4
base/poco/Net/src/TCPServerConnection.cpp:40: Poco::Net::TCPServerConnection::start() @ 0x000000003f3426f8
base/poco/Net/src/TCPServerDispatcher.cpp:115: Poco::Net::TCPServerDispatcher::run() @ 0x000000003f343328
base/poco/Foundation/src/ThreadPool.cpp:205: Poco::PooledThread::run() @ 0x000000003f257238
./base/poco/Foundation/src/Thread_POSIX.cpp:341: Poco::ThreadImpl::runnableEntry(void*) @ 0x000000003f251900
asan_thread_start(void*) @ 0x000000000f094ea8
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: Column A already added for reading (STID: 4792-6d2d)
CI report: AST fuzzer (arm_asan)
CIDB statistics: cidb
Test output: