Skip to content

Populate _time column from url table function - #103437

Merged
nickitat merged 1 commit into
masterfrom
fix-url-time-column
Apr 23, 2026
Merged

nickitat merged 1 commit into
masterfrom
fix-url-time-column

Conversation

@nickitat

@nickitat nickitat commented Apr 23, 2026 •

Copy link
Copy Markdown
Member

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 into CHANGELOG.md):

Populate _time column from url table function.

Version info

  • Merged into: 26.5.1.46
  • Backported to: 26.4.1.1122, 26.2.17.26, 26.1.12.23

@clickhouse-gh

clickhouse-gh Bot commented Apr 23, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [9e20787]

Summary: ❌

job_name test_name status info comment
Unit tests (msan, function_prop_fuzzer) FAIL IGNORED

AI Review

Summary

This PR fixes url/urlCluster virtual _time population by threading HTTP Last-Modified from StorageURLSource into file-like virtuals and adds stateless coverage for both header-present and header-absent cases. I did not find correctness, safety, or compatibility issues in the patch.

ClickHouse Rules
Item Status Notes
Deletion logging ➖
Serialization versioning ➖
Core-area scrutiny ✅
No test removal ✅
Experimental gate ➖
No magic constants ✅
Backward compatibility ✅
SettingsChangesHistory.cpp ➖
PR metadata quality ✅
Safe rollout ✅
Compilation time ✅
No large/binary files ✅
Final Verdict
  • Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-bugfix Pull request with bugfix, not backported by default label Apr 23, 2026
@clickhouse-gh

clickhouse-gh Bot commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 83.80% 83.80% +0.00%
Functions 91.10% 91.10% +0.00%
Branches 76.30% 76.20% -0.10%

Changed lines: 100.00% (18/18) · Uncovered code

Full report · Diff report

@thevar1able thevar1able self-assigned this Apr 23, 2026
@nickitat
nickitat enabled auto-merge April 23, 2026 20:08
@nickitat
nickitat added this pull request to the merge queue Apr 23, 2026
Merged via the queue into master with commit f17036a Apr 23, 2026
479 of 484 checks passed
@nickitat
nickitat deleted the fix-url-time-column branch April 23, 2026 20:22
@robot-ch-test-poll robot-ch-test-poll added the pr-synced-to-cloud The PR is synced to the cloud repo label Apr 23, 2026
@clickgapai

Copy link
Copy Markdown
Contributor

Hi — this PR may need backporting to 26.3 (LTS), 26.2, 26.1, 25.8 (LTS), but no backport label was found.

Affected code: StorageURLSource::generate — missing last_modified field in VirtualsForFileLikeStorage struct literal — core code present in all supported branches.

Why: The _time virtual column was introduced in VirtualColumnUtils.cpp in June 2024 (commit d0a2abe), predating all supported branches. tryGetLastModificationTime has existed in StorageURL.cpp since August 2023. The bug affects any user querying _time from url or urlCluster table functions on any supported branch. Fix is minimal and low-risk (adds one struct field).

If this should be backported, consider adding pr-must-backport or a version-specific label (e.g. v26.3-must-backport). Ignore this if backporting is not applicable.

@nickitat nickitat added the pr-must-backport Pull request should be backported intentionally. Use this label with great care! label Apr 28, 2026
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Apr 28, 2026
robot-clickhouse-ci-2 added a commit that referenced this pull request Apr 28, 2026
Cherry pick #103437 to 25.8: Populate `_time` column from `url` table function
robot-clickhouse added a commit that referenced this pull request Apr 28, 2026
robot-clickhouse-ci-2 added a commit that referenced this pull request Apr 28, 2026
Cherry pick #103437 to 26.1: Populate `_time` column from `url` table function
robot-clickhouse added a commit that referenced this pull request Apr 28, 2026
robot-clickhouse-ci-2 added a commit that referenced this pull request Apr 28, 2026
Cherry pick #103437 to 26.2: Populate `_time` column from `url` table function
robot-clickhouse added a commit that referenced this pull request Apr 28, 2026
robot-clickhouse-ci-2 added a commit that referenced this pull request Apr 28, 2026
Cherry pick #103437 to 26.4: Populate `_time` column from `url` table function
robot-clickhouse added a commit that referenced this pull request Apr 28, 2026
@robot-ch-test-poll robot-ch-test-poll added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Apr 28, 2026
nickitat added a commit that referenced this pull request Apr 28, 2026
Backport #103437 to 26.2: Populate `_time` column from `url` table function
nickitat added a commit that referenced this pull request Apr 28, 2026
Backport #103437 to 26.4: Populate `_time` column from `url` table function
nickitat added a commit that referenced this pull request Apr 30, 2026
Backport #103437 to 26.1: Populate `_time` column from `url` table function
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
…3437

Backport ClickHouse#103437 to 26.4: Populate `_time` column from `url` table function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-bugfix Pull request with bugfix, not backported by default pr-must-backport Pull request should be backported intentionally. Use this label with great care! pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants