Repository navigation
Closed
Closed
Copy link
Labels
fuzzProblem found by one of the fuzzersProblem found by one of the fuzzerstestingSpecial issue with list of bugs found by CISpecial issue with list of bugs found by CI
Description
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: 'Inconsistent AST formatting: the query: (STID: 1941-1bfa)
CI report: BuzzHouse (amd_debug)
Failing test history: cidb
Test output:
Error:
Logical error: 'Inconsistent AST formatting: the query:
INSERT INTO t6 (c0) (WITH '你们' AS a0, a0 AS a1, cte0d0 AS (SELECT c0 FROM (SELECT t0d1.c0 AS a2 FROM v164 AS t0d1 WHERE t0d1.c0 = '你们' GROUP BY 1 WITH CUBE WITH TOTALS) (c0)) SELECT CAST(addSeconds(now(), -10), 'DateTime64') FROM d9.v181 AS t0d1 OFFSET -5) EXCEPT (WITH cte0d1 AS (SELECT c0, c1 FROM (SELECT CAST('cd36b217-4fb8-c7a1-0ca3-333271748ba6', 'UUID') AS a4, -6106399385393587679) (c0, c1)) SELECT DISTINCT t0d1.c0 FROM cte0d0 AS t0d1 ARRAY JOIN t0d1.c0 AS a3 WHERE globalNotIn(a3, [CAST(today(), 'Date'), map(CAST('-8710198692606051426', 'Int64'), CAST('1:5:4:1:c:2:5:d', 'IPv6'))]) AND (a3 = (t0d1.c0.`Nullable(UInt8)`[c1])) WINDOW w0 AS () LIMIT 10, 0.3668 BY ALL)
cannot parse query back from WITH '你们' AS `a0`, `a0` AS `a1`, cte0d0 AS (SELECT `c0` FROM (SELECT `t0d1`.`c0` AS `a2` FROM `v164` AS t0d1 WHERE `t0d1`.`c0` = '你们' GROUP BY CUBE(1) WITH TOTALS)(c0)) INSERT INTO TABLE `t6` (`c0`) SELECT addSeconds(now(), -10)::DateTime64 FROM d9.`v181` AS t0d1 OFFSET -5 EXCEPT (WITH cte0d1 AS (SELECT `c0`, `c1` FROM (SELECT ALL 'cd36b217-4fb8-c7a1-0ca3-333271748ba6'::UUID AS `a4`, (-6106399385393587679))(c0, c1)) SELECT DISTINCT `t0d1`.`c0` FROM `cte0d0` AS t0d1 ARRAY JOIN `t0d1`.`c0` AS `a3` WHERE globalNotIn(`a3`, [today()::Date, map(-8710198692606051426::Int64, '1:5:4:1:c:2:5:d'::IPv6)]) AND `a3` == `t0d1`.`c0`.`Nullable(UInt8)`[`c1`] WINDOW w0 AS () LIMIT 0.3668 OFFSET 10 BY ALL);'.
---
Failed query:
INSERT INTO t6 (c0) (WITH '你们' AS a0, a0 AS a1, cte0d0 AS (SELECT c0 FROM (SELECT t0d1.c0 AS a2 FROM v164 AS t0d1 WHERE t0d1.c0 = '你们' GROUP BY 1 WITH CUBE WITH TOTALS) (c0)) SELECT CAST(addSeconds(now(), -10), 'DateTime64') FROM d9.v181 AS t0d1 OFFSET -5) EXCEPT (WITH cte0d1 AS (SELECT c0, c1 FROM (SELECT CAST('cd36b217-4fb8-c7a1-0ca3-333271748ba6', 'UUID') AS a4, -6106399385393587679) (c0, c1)) SELECT DISTINCT t0d1.c0 FROM cte0d0 AS t0d1 ARRAY JOIN t0d1.c0 AS a3 WHERE globalNotIn(a3, [CAST(today(), 'Date'), map(CAST('-8710198692606051426', 'Int64'), CAST('1:5:4:1:c:2:5:d', 'IPv6'))]) AND (a3 = (t0d1.c0.`Nullable(UInt8)`[c1])) WINDOW w0 AS () LIMIT 10, 0.3668 BY ALL)
---
Stack trace:
pthread_kill@@GLIBC_2.34 @ 0x00000000000969fd
raise @ 0x0000000000042476
__ieee754_lgamma_r @ 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) @ 0x00000000163db13c
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&) @ 0x00000000163dc54d
src/Common/Exception.cpp:143: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x00000000163dc839
src/Common/Exception.h:172: DB::Exception::Exception(String&&, int, String, bool) @ 0x000000000d9ce454
src/Common/Exception.h:58: DB::Exception::Exception(PreformattedMessage&&, int) @ 0x000000000d9cdf51
src/Common/Exception.h:190: DB::Exception::Exception<String&, std::basic_string_view<char, std::char_traits<char>>&>(int, FormatStringHelperImpl<std::type_identity<String&>::type, std::type_identity<std::basic_string_view<char, std::char_traits<char>>&>::type>, String&, std::basic_string_view<char, std::char_traits<char>>&) @ 0x000000001cba9ac6
src/Interpreters/executeQuery.cpp:1228: 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>, std::function<void ()>, DB::QueryResultDetails&) @ 0x000000001cba0be3
src/Interpreters/executeQuery.cpp:1962: DB::executeQuery(String const&, std::shared_ptr<DB::Context>, DB::QueryFlags, DB::QueryProcessingStage::Enum) @ 0x000000001cb967d4
src/Server/TCPHandler.cpp:774: DB::TCPHandler::runImpl() @ 0x00000000203f5e89
src/Server/TCPHandler.cpp:2867: DB::TCPHandler::run() @ 0x0000000020410ea4
base/poco/Net/src/TCPServerConnection.cpp:40: Poco::Net::TCPServerConnection::start() @ 0x00000000268f744e
base/poco/Net/src/TCPServerDispatcher.cpp:115: Poco::Net::TCPServerDispatcher::run() @ 0x00000000268f7abb
base/poco/Foundation/src/ThreadPool.cpp:205: Poco::PooledThread::run() @ 0x0000000026897fbf
base/poco/Foundation/src/Thread_POSIX.cpp:341: Poco::ThreadImpl::runnableEntry(void*) @ 0x000000002689564f
start_thread @ 0x0000000000094ac3
__GI___clone3 @ 0x00000000001268c0
Version info
- Resolved by: Allow alias in MODIFY ORDER BY to fix AST Inconsistency #96679
- Merged into:
26.2.1.600
Metadata
Metadata
Assignees
Labels
fuzzProblem found by one of the fuzzersProblem found by one of the fuzzerstestingSpecial issue with list of bugs found by CISpecial issue with list of bugs found by CI
Activity
george-larionov commentedon Jan 21, 2026
This failure: same as #90111
this one is similarly due to an alias in a weird place, this time in the MATERIALIZED part of a CREATE TABLE query.
george-larionov commentedon Jan 21, 2026
Recent failure is caused by alias in MODIFY TTL:
ahmadov commentedon Jan 27, 2026
Fixed by #95057
bharatnc commentedon Feb 10, 2026
Still reproduces. Eg: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=96505&sha=f6938ab2e6a5d0fdcf474874eaa9d9d67bf032cb&name_0=PR&name_1=BuzzHouse%20%28amd_debug%29 and cidb.
george-larionov commentedon Feb 11, 2026
Thanks @bharatnc, I'll take a look
alexey-milovidov commentedon Feb 11, 2026
Possibly related fixes: #95330 #95329 #95126 #95102 #95057 #96293