Skip to content

Fix alias error in distributed calls, simplification for nanoseconds in Iceberg - #2749

Open
ianton-ru wants to merge 5 commits into
antalya-26.6from
bugfix/antalya-26.6/remote-initiator-join-alias
Open

ianton-ru wants to merge 5 commits into
antalya-26.6from
bugfix/antalya-26.6/remote-initiator-join-alias

Conversation

@ianton-ru

Copy link
Copy Markdown

Solved #2748
Solved #2747

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

Fix alias error in distributed calls, simplification for nanoseconds in Iceberg

Documentation entry for user-facing changes

Solved #2748 - restore alias in distributed query (changes in src/Storages/IStorageCluster.cpp)
Solved #2747 - changes in #2239 for nanoseconds were overcomplicated, and broke work for microseconds. Partially reverted.

CI/CD Options

Exclude tests:

  • Fast test
  • Integration Tests
  • Stateless tests
  • Stateful tests
  • Unit tests
  • Performance tests
  • Aarch64 tests
  • All with ASAN
  • All with TSAN
  • All with MSAN
  • All with UBSAN
  • All with Coverage
  • All Regression
  • Disable CI Cache

Regression jobs to run:

  • Fast suites (mostly <1h)
  • Aggregate Functions (2h)
  • Alter (1.5h)
  • Benchmark (30m)
  • CAS (content-addressed storage; Antalya only)
  • ClickHouse Keeper (1h)
  • Iceberg (2h)
  • LDAP (1h)
  • OAuth (5m)
  • Parquet (1.5h)
  • RBAC (1.5h)
  • SSL Server (1h)
  • S3 (2h)
  • S3 Export (2h)
  • Swarms (30m)
  • Tiered Storage (2h)

ianton-ru and others added 4 commits October 30, 2026 16:13
`JoinedTables` only reads the outer table function, so an old-analyzer global JOIN failed with "No alias for subquery or table function in JOIN". The inner alias stays for the query sent to the remote initiator.

https: //github.com//issues/2748
Co-authored-by: Cursor <cursoragent@cursor.com>
…conds

Scale-6 bounds in the normal range were dropped, so min/max pruning skipped every `timestamp` file. Values above `1e18` are still converted from nanoseconds, and `(1e16, 1e18]` still fails open.

https: //github.com//issues/2747
Co-authored-by: Cursor <cursoragent@cursor.com>
Appendix D already sets the unit from the field type. `DateTime64(6)` stays microseconds and `DateTime64(9)` stays nanoseconds.

https: //github.com//issues/2747
Co-authored-by: Cursor <cursoragent@cursor.com>
The decoder reads bounds at the type scale. A `timestamp` column whose bounds are nanoseconds is corrupt data, so those tests are not required.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Workflow [PR], commit [a24fa31]

@ianton-ru
ianton-ru marked this pull request as ready for review October 30, 2026 18:37
@mkmkme

mkmkme commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator

@blau-ai

@blau-ai

blau-ai commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator

CI triage for a24fa31

4 red checks. None look caused by this PR: 1 pre-existing test failure, 2 known upstream crashes in aggregation code, 1 stress-harness timeout.

Everything that touches this PR passed: builds, unit tests (including the rewritten gtest_iceberg_field_parse_helpers), all integration shards, and the Iceberg and Swarms regression suites.

Check Failure Verdict
Stateless (amd_asan_ubsan, distributed plan, parallel, 2/2) 05387_s3_cluster_remote_initiator_keeps_stripped_join Pre-existing on antalya-26.6
Stateless (amd_binary, cas s3 storage, parallel) Server died: GroupingAggregatedTransform pushed bucket 4 twice Known upstream crash, not related to this PR
Stateless (amd_asan_ubsan, cas s3 storage, parallel, 1/2) Server died: GroupingAggregatedTransform pushed bucket 3 twice Same as above
Stress test (amd_debug, cas s3 storage) Test script failed, script exit code: 1 Infra: the stress harness timed out

1. 05387_s3_cluster_remote_initiator_keeps_stripped_join (pre-existing)

The CI report's randomized-settings diagnosis:

Runs: 25, Failed: 25 (same randomized settings)
Runs: 34, Failed: 0  (without randomization)
Culprit settings: --prefer_localhost_replica 0

The old (old analyzer) half passes. The analyzer half (query 7) fails on the remote initiator:

Code: 499. DB::Exception: Received from localhost:9000. ... Failed to get object info: No response body.. HTTP response code: 403.
Please check your AWS credentials and permissions: while reading '05387_test_xafu307b.tsv' in bucket 'test' on disk 'StorageS3': While executing Remote. (S3_ERROR)
  ... StorageObjectStorageStableTaskDistributor::getMatchingFileFromIterator <- TaskDistributor <- RemoteQueryExecutor::processReadTaskRequest

Why it's not this PR: #2713 is an unrelated backport (Nullable ALTER) at 5284d10. The same test fails there in the same suite, with the same 403 and the same culprit setting (Runs: 26, Failed: 26 → Culprit settings: --prefer_localhost_replica 0). This PR doesn't touch the test.

What to do: this PR works on the remote-initiator path, so you may want to deal with it here, though it doesn't block the PR. The 403 comes from the read-task callback on the remote initiator, so with prefer_localhost_replica = 0 the S3 credentials apparently don't reach the key iterator there. I haven't confirmed that. Options:

  • Real fix: find out why the credentials are lost on the analyzer path when the hop goes over TCP rather than local, probably a separate issue.
  • Stop-gap: pin prefer_localhost_replica = 1 in the test's SETTINGS, with a comment linking the issue, so the suite stops failing on every PR.

2. GroupingAggregatedTransform pushed bucket N twice (known upstream crash)

The server aborted on a logical error in both CAS-S3 stateless jobs:

Logical error: 'GroupingAggregatedTransform pushed bucket 4 twice'.
src/Processors/Transforms/MergingAggregatedMemoryEfficientTransform.cpp:63:15: DB::GroupingAggregatedTransform::pushData(...)
src/Processors/Transforms/MergingAggregatedMemoryEfficientTransform.cpp:123:9: DB::GroupingAggregatedTransform::tryPushTwoLevelData()

What to do: safe to re-run.

3. Stress test (amd_debug, cas s3 storage) (infra/harness)

Every server-health result was OK (Server successfully started, No lost s3 keys, No SharedMergeTree lost forever), and fatal.log is empty. The only failure is the pre-stress sanity run of 00001_select_1 and 00234_… in --replicated-database mode. Both tests passed in about 18s, but the whole clickhouse-test call overran its 180s wrapper timeout:

[2 / 2] 00001_select_1: [ OK ] 1.76 sec.   2 tests passed ... 17.98 s elapsed
subprocess.TimeoutExpired: Command '/usr/bin/clickhouse-test --stress-tests --cas-s3-storage ... --replicated-database --database test_5 ...' timed out after 180 seconds

That's slow setup or teardown of the replicated database on CAS S3, not a server problem.

What to do: safe to re-run.


Sources: the CI report (result_pr.json) for a24fa31, plus those of #2713 (5284d10) and #2644 (97ac101) for comparison. No local build or test run; this is from CI evidence only.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants