Repository navigation
Fix const string comparison not respecting some of the the cast settings - #95040
Merged
Merged
Conversation
Contributor
|
Workflow [PR], commit [4505a9d] Summary: ❌
|
tuanpach
approved these changes
Jan 26, 2026
Merged
via the queue into
ClickHouse:master
with commit Jan 26, 2026
88589db
129 of 130 checks passed
PedroTadim
added a commit
that referenced
this pull request
Nov 19, 2026
…f an enum `SerializationEnum::deserializeWholeText` read the TSV setting, so every reader of a whole string as an enum that gets the session format settings read the name as a number: comparisons with a string constant (since #95040), the `Form` format, and `CAST` of a string to a `Variant` with an `Enum`. The setting is needed only by `TSVRaw` and the `Raw` escaping rule, which reach the enum through `deserializeTextRaw`, so it moves there. The name lookup already falls back to the value, so the whole text still accepts a number. This replaces the reset of the setting in `ComparisonParams`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
PedroTadim
added a commit
to buggins/ClickHouse
that referenced
this pull request
Nov 20, 2026
…t_tsv_enum_as_number` Since ClickHouse#95040 the comparison functions parse a string constant with all format settings of the session, so `input_format_tsv_enum_as_number = 1` made `enum_column = 'name'` read `'name'` as a number and throw `UNKNOWN_ELEMENT_OF_ENUM`. `IN`, `has` and `CAST` were not affected. Co-Authored-By: Claude Opus 5.5 <[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):
Fix constant string comparisons not respecting the settings
cast_string_to_date_time_mode,bool_true_representation,bool_false_representation, andinput_format_null_as_default. Closes #91681.Documentation entry for user-facing changes
Version info
26.1.1.894