Repository navigation
Do not accept trailing garbage for CSV-deserialized Time64 values - #102596
Merged
Merged
Conversation
Contributor
|
Workflow [PR], commit [4c0fe0c] Summary: ❌
AI ReviewSummaryThis PR tightens Findings💡 Nits
ClickHouse Rules
Final Verdict
|
ahmadov
approved these changes
Apr 15, 2026
Contributor
LLVM Coverage Report
Changed lines: 100.00% (10/10) · Uncovered code |
yariks5s
enabled auto-merge
April 27, 2026 05:45
leshikus
added a commit
to leshikus/ClickHouse
that referenced
this pull request
Apr 27, 2026
…-serialization` PR ClickHouse#102596 (`yarik/fix-time64-serialization`) added a trailing-garbage check in `deserializeTextCSV`: after parsing the unquoted field as a time string, it now throws `UNEXPECTED_DATA_AFTER_PARSED_VALUE` if the buffer is not fully consumed. The test was using `45045123` as an unquoted CSV value. `readTime64Text` parsed only `45` (SS format) and left `045123` as "trailing garbage", causing the test to fail across all stateless-test configurations. Fix: replace the raw integer with `12:30:45.123`, a proper unquoted time string, and rename the section header accordingly. The expected output (`00:00:00.000` / `12:30:45.123`) is unchanged since the quoted-CSV and unquoted time-string paths both normalise correctly. Ref: ClickHouse#103307 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
1 task
1 task
pull Bot
pushed a commit
to AnotherGenZ/ClickHouse
that referenced
this pull request
Apr 27, 2026
Test 04122_serialization_time64_formats was added on master at the same time as the fix in PR ClickHouse#102596 ("Do not accept trailing garbage for CSV-deserialized Time64 values"). The test reference captured the old buggy behavior where the unquoted CSV input '45045123' would silently be parsed as just '45'. After PR ClickHouse#102596, that input correctly throws UNEXPECTED_DATA_AFTER_PARSED_VALUE. Update the section to assert the new behavior and add a separate case for a valid unquoted numeric ('0'). Failing report: https://play.clickhouse.com/play?user=play&run=1#U0VMRUNUIGNoZWNrX25hbWUsIHRlc3RfbmFtZSwgcmVwb3J0X3VybApGUk9NIGNoZWNrcwpXSEVSRSAxCiAgICBBTkQgY2hlY2tfc3RhcnRfdGltZSA+PSBub3coKSAtIElOVEVSVkFMIDI0IEhPVVIKICAgIEFORCAoaGVhZF9yZWYgPSAnbWFzdGVyJyBBTkQgc3RhcnRzV2l0aChoZWFkX3JlcG8sICdDbGlja0hvdXNlLycpKQogICAgQU5EIHRlc3Rfc3RhdHVzICE9ICdTS0lQUEVEJwogICAgQU5EICh0ZXN0X3N0YXR1cyBMSUtFICdGJScgT1IgdGVzdF9zdGF0dXMgTElLRSAnRSUnKQogICAgQU5EIGNoZWNrX3N0YXR1cyAhPSAnc3VjY2VzcycKICAgIEFORCBjaGVja19uYW1lIE5PVCBMSUtFICdsaWJGdXp6ZXIlJwogICAgQU5EIGNoZWNrX25hbWUgIT0gJ0NsaWNrSG91c2UgS2VlcGVyIEplcHNlbicKICAgIEFORCBjaGVja19uYW1lIE5PVCBJTElLRSAnJWV4cGVyaW1lbnRhbCUnCk9SREVSIEJZIGNoZWNrX25hbWUsIHRlc3RfbmFtZSwgY2hlY2tfc3RhcnRfdGltZQ== Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
1 task
leshikus
added a commit
to leshikus/ClickHouse
that referenced
this pull request
May 2, 2026
commit 600be4aa8a8613d0a4ba9b7e8ad846f789dc93ba Merge: febefb0 4e4a4c0 Author: Alexei Fedotov <[email protected]> Date: Sat May 2 13:48:18 2026 +0200 Merge branch 'master' into add-ci-tests-init commit febefb0 Author: Alexei Fedotov <[email protected]> Date: Fri May 1 01:13:37 2026 +0200 Remove unimplemented `job_filter_bypass_labels` field from `Workflow.Config` The field was declared but never consumed by the job filtering logic in `native_jobs.py`, so `"ci-all-jobs"` label would have had no effect. Also reverts the `BUILD_TOOLCHAIN (amd64)` timeout override that was included in the same commit by mistake. commit bca4a1f Merge: fa4ec08 a0aae2a Author: Alexei Fedotov <[email protected]> Date: Fri May 1 01:03:46 2026 +0200 Merge branch 'master' into add-ci-tests-init commit fa4ec08 Merge: 062b466 d3573bd Author: Alexei Fedotov <[email protected]> Date: Tue Apr 28 07:59:44 2026 +0200 Merge branch 'master' into add-ci-tests-init commit 062b466 Author: Alexei Fedotov <[email protected]> Date: Mon Apr 27 15:12:22 2026 +0200 Revert "Address review: keep release-PR guard unconditional when `ci-all-jobs` label is set" This reverts commit e9f8a95. commit e9f8a95 Author: Alexei Fedotov <[email protected]> Date: Mon Apr 27 15:07:34 2026 +0200 Address review: keep release-PR guard unconditional when `ci-all-jobs` label is set Add `job_filter_bypass_exclude_labels` to `Workflow.Config`. When any of those labels are present, `job_filter_bypass_labels` is ignored so `workflow_filter_hooks` and file-based job filtering both run normally. Configure `pull_request.py` with `job_filter_bypass_exclude_labels=["release", "release-lts"]` so a PR carrying both `ci-all-jobs` and a release label still has every job skipped by the `should_skip_job` release guard, consistent with the PR description ("Release labels still take priority"). Co-Authored-By: Claude Sonnet 4.6 <[email protected]> commit c07de66 Author: Alexei Fedotov <[email protected]> Date: Mon Apr 27 13:09:24 2026 +0200 Fix `04122_serialization_time64_formats` test after `yarik/fix-time64-serialization` PR ClickHouse#102596 (`yarik/fix-time64-serialization`) added a trailing-garbage check in `deserializeTextCSV`: after parsing the unquoted field as a time string, it now throws `UNEXPECTED_DATA_AFTER_PARSED_VALUE` if the buffer is not fully consumed. The test was using `45045123` as an unquoted CSV value. `readTime64Text` parsed only `45` (SS format) and left `045123` as "trailing garbage", causing the test to fail across all stateless-test configurations. Fix: replace the raw integer with `12:30:45.123`, a proper unquoted time string, and rename the section header accordingly. The expected output (`00:00:00.000` / `12:30:45.123`) is unchanged since the quoted-CSV and unquoted time-string paths both normalise correctly. Ref: ClickHouse#103307 Co-Authored-By: Claude Sonnet 4.6 <[email protected]> commit 0ebb9c7 Author: Alexei Fedotov <[email protected]> Date: Mon Apr 27 13:09:14 2026 +0200 Move `ci-all-jobs` bypass out of filter hooks into the call site `job_filter_bypass_labels` was only checked in the file-based filtering phase of `_config_workflow`, so `workflow_filter_hooks` (e.g. `private_job_filter`) still ran and skipped jobs even when the `ci-all-jobs` label was set. Fix: check `job_filter_bypass_labels` before iterating `workflow_filter_hooks` in `native_jobs.py` so the bypass is applied uniformly to all hook-based filtering, not just file-based filtering. The now-redundant early-return for `Labels.CI_ALL_JOBS` inside `should_skip_job` is removed — it is dead code once the call site handles the bypass. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> commit dc35478 Author: Alexei Fedotov <[email protected]> Date: Mon Apr 27 08:54:44 2026 +0200 Fix race condition and error masking in `test_accept_invalid_certificate` `execute_query_native` wrote all test configurations to the same `configs/client.xml` path, causing parallel test invocations to clobber each other's config and produce inconsistent TLS behaviour. Additionally, calling `remove()` inside the `except` block could raise `FileNotFoundError`, which replaced the real SSL exception and broke the `assert "certificate verify failed"` checks. Fix: write each config to a unique temp file via `tempfile.mkstemp` and clean it up in a `finally` block that swallows `FileNotFoundError`. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> commit 263d43a Merge: 5176553 c37e307 Author: Alexei Fedotov <[email protected]> Date: Mon Apr 27 08:50:41 2026 +0200 Merge branch 'master' into add-ci-tests-init commit 5176553 Author: Alexei Fedotov <[email protected]> Date: Sun Apr 26 09:48:31 2026 +0200 CI: fix `LLVM Profile Warning: Running out of static counters` in PGO build The Stage 1 instrumented clang was compiled with the default value-profiling counter limit of 3 slots per indirect call site. During ClickHouse profile collection, the instrumented binary emitted: LLVM Profile Warning: Unable to track new values: Running out of static counters. Consider using option -mllvm -vp-counters-per-site=<n> to allocate more value profile counters at compile time This saturates call-site counters and loses indirect-call frequency data needed by the PGO optimizer in Stage 2, reducing the quality of the final toolchain. Fix: pass `-mllvm -vp-counters-per-site=8` via `CMAKE_C_FLAGS` / `CMAKE_CXX_FLAGS` when building Stage 1. The flag is baked into the instrumented binary at compile time, so the running binary can track up to 8 distinct callees per indirect call site instead of 3. Seen in: ClickHouse#103307 Co-Authored-By: Claude Sonnet 4.6 <[email protected]> commit 22a4eb5 Author: Alexei Fedotov <[email protected]> Date: Sun Apr 26 00:17:19 2026 +0200 Update workflows commit e281776 Merge: 807b47f 7fc29dc Author: Alexei Fedotov <[email protected]> Date: Sun Apr 26 00:16:47 2026 +0200 Merge branch 'master' into add-ci-tests-init commit 807b47f Author: Alexei Fedotov <[email protected]> Date: Sun Apr 26 00:08:57 2026 +0200 CI: increase `Build Toolchain (PGO, BOLT) (amd64)` timeout to 8 h on PR 3 h was too tight; raise to 8 h to match the previous default. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> commit eb73037 Author: Alexei Fedotov <[email protected]> Date: Sat Apr 25 10:55:39 2026 +0200 Update workflows commit 30ba815 Merge: 8154744 04bd709 Author: Alexei Fedotov <[email protected]> Date: Sat Apr 25 10:54:58 2026 +0200 Merge branch 'master' into add-ci-tests-init commit 8154744 Author: Alexei Fedotov <[email protected]> Date: Sat Apr 25 10:22:14 2026 +0200 CI: fix flaky check assertion and toolchain timeout on PR - In `integration_test_job.py`, fall back to a sanity test when `is_flaky_check` is True, no changed integration test modules are found, and `ci-all-jobs` label is set (which bypasses job skips and would otherwise hit the assertion) - In `pull_request.py`, override timeout to 3 hours for `Build Toolchain (PGO, BOLT) (amd64)` in the PR workflow Co-Authored-By: Claude Sonnet 4.6 <[email protected]> commit 040de15 Author: Alexei Fedotov <[email protected]> Date: Fri Apr 24 19:51:10 2026 +0200 CI: fix `_log_fd` leak in `ClickHouseService` when `Popen` raises Use a `with` block so the log file descriptor is always closed after `subprocess.Popen` returns, whether it raises or not. The child process holds its own dup'd fd, so closing Python's copy is safe. Removes the now-unnecessary `_log_fd` instance variable and its associated `flush`/`close` calls. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> commit 1eeef90 Author: Alexei Fedotov <[email protected]> Date: Fri Apr 24 19:38:55 2026 +0200 CI: add `ci-all-jobs` label to bypass all job skips Add a new `ci-all-jobs` PR label that disables both filter-hook skips and file-based job filtering, so every job in the workflow runs regardless of changed files or other label-based conditions. Release labels still take priority. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> commit f265406 Author: Alexei Fedotov <[email protected]> Date: Fri Apr 24 19:25:35 2026 +0200 Restore --init commit 72fda4b Merge: 7fcb083 cf81ad1 Author: Alexei Fedotov <[email protected]> Date: Fri Apr 24 19:24:06 2026 +0200 Merge branch 'master' into add-ci-tests-init commit 7fcb083 Author: Alexei Fedotov <[email protected]> Date: Wed Apr 22 22:05:03 2026 +0200 ci: resolve merge conflict in `ci_tests_job.py` Co-Authored-By: Claude Sonnet 4.6 <[email protected]> commit 5cac837 Merge: 8d8f5a1 3f97d3d Author: Alexei Fedotov <[email protected]> Date: Wed Apr 22 12:07:22 2026 +0200 Merge branch 'master' into add-ci-tests-init commit 8d8f5a1 Author: Alexei Fedotov <[email protected]> Date: Tue Apr 21 23:42:06 2026 +0200 CI: fix perf-test SIGTERM by using start_new_session=True, restore --init The performance test driver was being killed by its own `SIGTERM` because `Utils.terminate_process_group` called `os.killpg(os.getpgid(child_pid), SIGTERM)`, but the child server inherited the driver's own process group (since `subprocess.Popen` was called with `shell=True` and no session isolation). With `--init` injecting `tini` as PID 1 the driver was no longer immune to `SIGTERM`, so the bogus `killpg` killed it — producing "Job killed, exit code [143]". Root-cause fix: add `start_new_session=True` to both `Popen` calls in `ci/jobs/performance_tests.py` (`start_preconfig` and `start`). This gives the server its own process group, so `os.killpg` can only reach server processes and the driver is safe. With the real fix in place: - `--init` is restored in `ci/praktika/runner.py` (it provides correct zombie reaping and was correct to add in ClickHouse#102529). - The temporary `--skip test_cleanup_kills_orphaned_test_process` workaround is removed from the `CI Tests` job config; the test can now run normally. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Now we do not accept garbage at the end of Time64 CSV values with
input_format_csv_use_default_on_bad_values=0. Closes #102490Documentation entry for user-facing changes
Version info
26.5.1.128