Repository navigation
Description
✅ I checked the Altinity Stable Builds lifecycle table, and the Altinity Stable Build version I'm using is still supported.
Type of problem
Bug report - something's broken
Describe the situation
#2228 ("Remove object_storage_cluster_join_mode=local") says that object_storage_cluster_join_mode='global' now works with the old analyzer, and it rewrote test_remote_initiator_global_join_without_analyzer to expect a result. The query fails instead. When object_storage_remote_initiator=1 and allow_experimental_analyzer=0, the query that the initiator sends to the remote node is rejected with Code: 206 ... No alias for subquery or table function in JOIN.
This issue:
- Fails
test_storage_iceberg_with_spark/test_remote_initiator.py::test_remote_initiator_global_join_without_analyzer[s3] - Reproduces on every build type that runs integration tests (
amd_tsan,amd_asan_ubsan,arm_binary) on every run since the merge, so it is deterministic - Was not caught on the PR because Remove object_storage_cluster_join_mode=local #2228 excluded the ARM and all sanitizer jobs, which skipped every integration job
How to reproduce the behavior
Environment
- Version: 26.6.8.20003.altinityantalya (also every
antalya-26.6build since 2026-10-26) - Build type: any
Steps
cd tests/integration
./runner 'test_storage_iceberg_with_spark/test_remote_initiator.py::test_remote_initiator_global_join_without_analyzer'The query the test runs, where t1 is an Iceberg table and t2 is a Memory table:
SELECT t1.tag, t1.number, t2.number2
FROM <iceberg_table> AS t1
JOIN <memory_table> AS t2 USING (tag)
SETTINGS
object_storage_remote_initiator = 1,
object_storage_remote_initiator_cluster = 'cluster_simple',
object_storage_cluster_join_mode = 'global',
allow_experimental_analyzer = 0Expected behavior
Returns 1 1 2.
Actual behavior
E helpers.client.QueryRuntimeException: Client failed! Return code: 206, stderr: Received exception from server (version 26.6.8):
E Code: 206. DB::Exception: Received from 172.16.1.10:9000. DB::Exception: No alias for subquery or table function in JOIN
(set joined_subquery_requires_alias=0 to disable restriction).
While processing ' remote('node1:9000', icebergS3('http://minio1:9001/root/.../', 'minio', '[HIDDEN]', 'Parquet', '`tag` Nullable(Int32), `number` Nullable(Int32)') AS t1)'. Stack trace:
5. src/Interpreters/JoinedTables.cpp:277:23: DB::JoinedTables::resolveTables()
6. src/Interpreters/InterpreterSelectQuery.cpp:701:37: DB::InterpreterSelectQuery::InterpreterSelectQuery(...)
9. src/Storages/StorageDistributed.cpp:1378:18: DB::StorageDistributed::read(...)
10. src/Storages/IStorageCluster.cpp:641:34: DB::IStorageCluster::readFromRemoteInitiator(...)
11. src/Storages/IStorageCluster.cpp:701:9: DB::IStorageCluster::read(...)
Root cause analysis
In the old-analyzer path, IStorageCluster::readFromRemoteInitiator rewrites the left table expression into a remote(...) table function, but it attaches the alias to the inner table function:
remote('node1:9000', icebergS3(...) AS t1)
The alias should be on the outer table expression (remote(...) AS t1). In the query that the remote node receives, the JOIN's left side therefore has no alias, and JoinedTables::resolveTables rejects it under joined_subquery_requires_alias=1. That rewrite logic is in the ~450 lines #2228 changed in src/Storages/IStorageCluster.cpp.
Before #2228, this combination returned an explicit error (object_storage_cluster_join_mode!='allow' is not supported without allow_experimental_analyzer=true), and the test asserted that error. The PR replaced the guard with the new path and updated the test, but the test never ran on the PR.
Additional context
CI failure
- Jobs:
Integration tests (arm_binary, distributed plan, 4/4),Integration tests (amd_tsan, 4/6),Integration tests (amd_asan_ubsan, db disk, old analyzer, 4/8) - Branch:
v26.6.8.20003.altinityantalya(tag ofantalya-26.6) - Commit:
07b090420c4daf9c25f83fb52cc4f41996200cba - Run: https://github.com/Altinity/ClickHouse/actions/runs/40906560905
- CI report: ci_run_report.html
Timeline on antalya-26.6 MasterCI
- 2026-10-25 run 40148050191 at
c4e9bc72, before the merge: no failure - Remove object_storage_cluster_join_mode=local #2228 merged 2026-10-25 15:39 UTC
- 2026-10-26 run 40250933654 at
d8c48507, and every run since: fails
Related PR
- Remove object_storage_cluster_join_mode=local #2228: Remove object_storage_cluster_join_mode=local. It introduced the change that caused this regression (solves Remove
object_storage_cluster_join_mode='local'— it is now equivalent to'allow'#1827). - Add
object_storage_cluster_join_mode='distributed'for whole-query … #2383 (open) also changesIStorageCluster, but it does not touch this path or this test.
Activity