Repository navigation
Conversation
…iteral At the default validate_enum_literals_in_operators = 0 the setting documents that non-member enum literals are not validated, yet comparing an Enum column with one raised UNKNOWN_ELEMENT_OF_ENUM, and whether it did depended on the physical layout of the table. Two independent defects caused it. Index analysis converted the literal to the key type with the throwing convertFieldToType in KeyCondition::extractAtomFromTree, which made the isNull() handling directly below it unreachable even though that handling exists for exactly this case. Because minmax and set build their own KeyCondition over the index expression, that one line served the primary key, the partition key and both of those indexes; bloom_filter does not use KeyCondition and repeated the same pattern at four of its own sites, as did the JSON subcolumn helper shared by the bloom_filter and tokenbf_v1 families. Each conversion is now wrapped in a catch scoped by isParseError, following the existing precedent in ConditionSelectivityEstimator, so a literal with no representation in the target type declines the atom (an un-prunable full scan, never a wrong answer) while fatal errors such as MEMORY_LIMIT_EXCEEDED, cancellation and logical errors keep propagating. In the JSON helper an explicit isNull() check was also needed: comparing a null Field against getDefault() is false, so without it a failed conversion would have reported "safe to skip this granule" off a comparison that never happened. The second defect was an inverted guard on the notEquals tolerance in FunctionsComparison.h. Its condition, !equals && not_equals, is true for notEquals alone, while the value the tolerant branch returns, IsOperation<Op>::not_equals, was written to serve notEquals. The branch could therefore only ever return 0 and its true case was dead. Deleting the guard is the correct fix: any rewrite that keeps a condition there sends the four ordered operators, for which both traits are false, into the throwing conversion and turns operators that work today into throwers. Declining an atom loses no pruning that exists today. LIKE over an Enum key never pruned before this change, because the converted field is an Int8 and the like atom handler requires a String, so the only behaviour that changes on these paths is an exception becoming an answer. ALTER ... PARTITION literal resolution is deliberately untouched, so a bad partition literal keeps being rejected, and with the setting enabled every operator still throws. Two details of the report are corrected by measurement: the ordered operators do not throw on a non-key column, so on that path only != was affected, and the column does not need to be in a key at all, since attaching a minmax, set or bloom_filter index to an Enum column in no key is sufficient. e <=> '4' and isDistinctFrom(e, '4') share both code paths and were affected as well. Closes: ClickHouse#111545
… tests The result counts alone could not tell "declines this invalid literal" from "declines every Enum predicate": each assertion was paired with a use_skip_indexes = 0 twin returning the same value, so an unconditional decline at any of the independently changed conversion sites would have left the reference files byte-identical. Assert index usability directly with force_data_skipping_indices, which raises INDEX_NOT_USED once a skip index becomes alwaysUnknownOrTrue: a member literal must still use each index, a non-member literal must decline it. Verified by mutation: over-declining in either the bloom filter helper or KeyCondition now reddens the key-analysis test, and either new fail-closed branch in the JSON subcolumn helper reddens the JSON test. Two behaviours were measured rather than assumed. set(N) decides usability structurally, not from a KeyCondition atom, so it keeps using the index for a non-member literal and the test asserts that instead. The JSON helper declines the Enum's default value by a pre-existing rule, so the usable arm compares against a non-default member. Also cover a non-Enum key type: a literal outside the cast target's range converts to a null Field without throwing, which is the shape the added null check actually guards. Add the missing tag lines (no-parallel-replicas on both, no-fasttest on the JSON test, matching every in-tree JSONAllPaths index test), pin the plan renderer for the EXPLAIN assertions, and drop the obsolete allow_experimental_json_type setting. Co-Authored-By: Claude Fable 5 <[email protected]>
Internal second-model reviewTwo review rounds. Round 1 raised three test-liveness blockers, all AGREEd and fixed ❌ Result-count-only skip-index oracle (AGREE, fixed). The skip-index sections asserted row ❌ Same vacuity in the JSON test, plus unmeasured breadth (AGREE, fixed). The added
💡 Two notes recorded rather than papered over. One claim I raised and then withdrew on measurement: that the Session id: cron:clickhouse-review-slot-11:20260809-130900 |
Pre-PR validation gate
|
|
cc @shankar-iyer @Ergus, could you review this? At the default |
|
Workflow [PR], commit [9c3a8f1] Summary: ❌
AI ReviewSummaryThis PR fixes the main Findings
Tests
Final VerdictChanges requested: the default-path fix looks sound, but the enabled LLVM Coverage ReportMeasured on commit 9c3a8f1.
Changed lines: Changed C/C++ lines covered: 43/45 (95.56%) · Uncovered code |
CI finish ledger — 6505d0cEvery failure below has an owner: a fixing PR (mine or external), or a full-effort fix task
Both tests pass on all 20 other flavours (including 50x flaky-check on 4 sanitizers and both Session id: cron:our-pr-ci-monitor:20260809-220000 |
The old analyzer constant-folds a non-member Enum comparison to false before the plan reaches ReadFromMergeTree, so the MergeTree read is dropped entirely and no index analysis runs. force_data_skipping_indices therefore never raises INDEX_NOT_USED, and EXPLAIN indexes = 1 emits no Indexes: block at all. That made five assertions fail on the amd_llvm_coverage old-analyzer job while passing on 20 other flavours. Only the five assertions whose predicate is a bare scalar comparison are pinned. The has / hasAny / hasAll / mapContains arms and the CAST(j.a AS UInt8) = 999 arm are not foldable and already raise INDEX_NOT_USED under both analyzers, so they stay unpinned. A blanket no-old-analyzer tag was rejected: the notEquals, isDistinctFrom, LIKE, NOT LIKE and partition-key LIKE shapes still reach the bug under the old analyzer, and both tests were measured to still fail on a pristine-master binary with the old analyzer, so tagging them out would have deleted live coverage. The EXPLAIN pin goes on the outer query because changing enable_analyzer inside a subquery raises INCORRECT_QUERY. Verified: both tests pass under enable_analyzer 0 and 1 against the same reference (25 randomized runs each, 100/100), still fail on the pristine-master binary under both analyzers, and each pinned assertion was A/B'd fix-vs-base individually.
… setting is on The enabled-setting section covered =, !=, <=> and isDistinctFrom but not <, <=, > or >=, so a silent loss of validation for those four would have left it green. This PR deletes a guard in the shared branch that all six operators reach, which is exactly where such a regression would land. Measured: all four throw UNKNOWN_ELEMENT_OF_ENUM at validate_enum_literals_in_operators = 1 on both the fixed and the pristine-master binary, and still return 0 at the default. A mutation that short-circuits the ordered operators out of the setting-honouring branch reddens these four assertions and nothing else.
|
Fixed the two test failures on Cause: with the old analyzer a non-member Enum comparison is constant-folded to false before the plan reaches I pinned I did not tag the tests Also added four assertions that Verified: both tests pass under |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Object file sizes11 object files changed (-532 B total), 0 added.
716 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only Compile time of recompiled translation units24 translation units recompiled, 199 s compile time in total, 23 of them have a recent master baseline. |
CI finish ledger - 377c919Every failure below has an owner: a fixing PR (mine or external), or a full-effort fix task
CI is fully finished on this head with zero failing checks. This supersedes my ledger on the previous head Session id: cron:our-pr-ci-monitor:20260810-063000 |
|
@nihalzp Like to check this one? |
Master rewrote tryMatchJSONSubcolumnToIndex in MergeTreeIndexJSONSubcolumnHelper.cpp and dropped the includes that rewrite no longer needs. The only conflict was the include block: kept master's removal of DataTypes/NestedUtils.h (unused after its rewrite) and this branch's Formats/ParseError.h, which isJSONPathFilterSafe needs for the isParseError-scoped catch. Both function bodies merge unchanged. Verified the merged tree is byte-identical to this branch's diff re-applied on the pinned master sha, submodule gitlinks included.
|
Merged master to resolve the conflict; the branch is mergeable again. Master rewrote No change to this PR's content: for 7 of the 8 files the per-file patch-id is identical Verified on the merged tree: full rebuild clean, both new tests pass 50/50 randomized runs, |
|
|
||
| /// Like convertFieldToType, but a literal with no representation in the index type yields a null | ||
| /// Field instead of throwing: every caller already treats null as "the index cannot be used". | ||
| static Field convertFieldToIndexType( |
There was a problem hiding this comment.
This still leaves one Enum carrier behind: the new tolerant conversion is used for plain scalar predicates, has / hasAny / hasAll, mapContains, and JSON paths, but the arrayElement(map, key) = value / map.key_* = value branch below still feeds const_value straight into BloomFilterHash::hashWithField. On INDEX mapValues(m) TYPE bloom_filter over Map(String, Enum8('a' = 1, 'b' = 2)), m['k'] = 'zzz' will therefore hit hashWithField(Enum8, String) and throw during index analysis instead of declining the atom; the mapKeys side on Map(Enum8(...), T) has the same problem, and the rewritten subcolumn form can throw even earlier in tryParseMapSubcolumn. This branch needs the same tolerant conversion / decline behavior as the other bloom-filter Enum sites.
There was a problem hiding this comment.
Verified on the fix binary (Build ID b4b2819e) and a pristine master binary (594b0c0e). The line is real, but it is not this PR's defect, and the proposed remedy does not work.
MergeTreeIndexBloomFilter.cpp:998 does pass const_value to hashWithField unconverted, confirmed by stack trace. Four corrections:
- Base-identical. That line is byte-identical to master's
:980and is not in this PR's changed path. Every arm below throws the same code and message on both binaries. - Not the non-member-literal defect. The error is
Code 170 BAD_GET("has String, requested Int64"), notCode 691. A valid member throws too: onMap(String, Enum8('a' = 1, 'b' = 2))withINDEX mapValues(m) TYPE bloom_filter,m['k'] = 'a'fails identically tom['k'] = 'zzz'. A tolerant conversion for non-member literals cannot fix a predicate whose literal is a member. - Not Enum-specific. Valid values only, same index:
Enum8andDateTimethrow 170 ("has String, requested UInt64" for the latter), whileString,FixedString(3),UInt8andLowCardinality(String)all return correct counts. convertFieldToIndexTypewould not help.BAD_GETis not inisParseError()(src/Formats/ParseError.cpp), so it would rethrow unchanged. The site needs the type conversion it never had, not a tolerant decline.
The mapKeys claim never reaches index analysis: m['zzz'] on Map(Enum8(...), UInt64) is rejected by arrayElement itself with Code 43 ILLEGAL_TYPE_OF_ARGUMENT, identically for a valid key. With a correctly typed key it returns the right answer on both binaries, via :662, whose field is already deserialized through the index key type.
The subcolumn claim is unreachable from SQL: m. + backtick-k is Code 47 UNKNOWN_IDENTIFIER. That name is produced internally by FunctionToSubcolumnsPass::optimizeFunctionArrayElementForMap, which gates on tryInsert into the map key type (FunctionToSubcolumnsPass.cpp:209), so a key that cannot be parsed never becomes a subcolumn name. Where the rewrite does fire it lands on the same :998 (measured identical with optimize_functions_to_subcolumns 0 and 1).
Causal control: SETTINGS use_skip_indexes = 0 returns the correct counts for both throwing arms, so index analysis is the site.
Not folding it into this PR: it is a different root cause (a missing conversion that rejects valid values), it is broader than Enum, and this PR is already +464 and under review. I am raising it separately, the same shape as #110038 for the token-index family.
There was a problem hiding this comment.
Correcting my own last paragraph: I said I would raise this separately. That was wrong, and I should have checked my own open PRs first.
#107076 already fixes exactly this site, and it is mine. It replaces const_value = value_field in the has_values_index branch with convertFieldToType(value_field, *values_index_value_type, value_type.get()), declining the atom on a null result or a non-propagating throw, and it ships 04327_map_bloom_filter_index_fixed_string_default.sql whose fixture is literally map Map(String, Enum8('one' = 1, 'two' = 2)) with a mapValues bloom filter. That test is OK 1292 times across CI on #107076 (1 FAIL, 13 SKIPPED). Because the conversion is generic rather than Enum-specific, it covers the DateTime carrier I measured as well.
So the correct disposition for the line you flagged is: already fixed in flight by #107076, no new work, nothing to fold into this PR.
Everything else in my previous reply stands as measured: the line is base-identical and outside this PR's changed path, the failure is Code 170 BAD_GET on valid members rather than Code 691 on non-members, convertFieldToIndexType alone would not fix it since BAD_GET is not in isParseError(), and the mapKeys and map.key_* specifics are unreachable for the reasons given.
One correction in your favour on scope: the mapKeys side of that same branch (has_keys_index, :662) is genuinely untouched by #107076. It needs nothing today because map_info->key_field is deserialized through the index key type by tryResolveMapIndexInfo, and I measured a correctly typed key returning the right answer on both binaries, but that is a narrower reason than the one I gave.
CI finish ledger for c849bc7CI is fully finished on this head and there are no failures to own: 177 checks, 160 success, CIDB agrees: 0 rows with
This is the first ledger covering the head produced by the 2026-08-13 master merge; the two Session id: cron:our-pr-ci-monitor:20260813-213000 |
|
Let's merge with master and fix conflicts. |
Master rewrote the four bloom-filter call sites this branch had made tolerant of non-member Enum literals. Two changes landed in the same lines: - 55a52d8 / ec1641c / cc4ad33 introduced coerceStringFieldLikeSearchFunction, searchFunctionCoercesConstant and convertConstantForArrayIndexFunction, and gave createColumnFromConstantArray two more parameters, so the `has`/`indexOf`, `hasAny`/`hasAll` and `mapContains*` sites now pick a coercion mode before converting. - This branch had replaced the bare convertFieldToType at those sites with convertFieldToIndexType, which turns a parse error into a null Field so the caller declines the atom instead of throwing during index analysis. Resolution keeps master's coercion logic verbatim and routes only its four remaining convertFieldToType calls through convertFieldToIndexType, so the two fixes compose: the coercion decides which stored form to hash, and the tolerant conversion decides whether the literal has a stored form at all. The FixedString-width early declines master added are left ahead of the conversion, where they short-circuit without needing it. The index carries no submodule pin changes; the resolved tree's src diff against master is byte-identical in size to this branch's pre-merge content (8 files, +464/-9). Requested by @ nihalzp on the pull request.
|
Merged master in and resolved the conflict: The conflict was in I kept master's coercion logic verbatim and routed only its four remaining Verified on the merged tree (build ID Mutation control, so that green is not vacuous: reverting just those four sites to the plain The committed tree carries no submodule pin changes, and its diff against master matches the pre-merge content exactly (8 files, +464/-9). |
The regression only exercised the key side of a Map. traverseTreeEquals reads the element type from getValueType() for mapContainsValue and from getKeyType() for mapContainsKey/mapContains, so the value side reaches the tolerant conversion through a distinct path and could regress without the test going red. Adds mapContainsValue over Map(String, Enum8) with a mapValues bloom_filter, and the mapContainsKey spelling on the existing key-side table. Both a member and a non-member literal are asserted, together with the use_skip_indexes = 0 control and the force_data_skipping_indices index-usability pins, so an over-broad decline cannot leave the result counts unchanged. Measured against a pristine master binary: every new non-member assertion fails there with UNKNOWN_ELEMENT_OF_ENUM and passes on this branch, while the member assertions agree on both, so the added coverage is not vacuous.
Merged at 573230b. One conflict, in MergeTreeIndexBloomFilter.cpp at the scalar equality site. Master gained the zero-padding soundness guard from ClickHouse#112639 there, which declines the index when a String or FixedString constant's padded match family does not collapse to a single stored value, and it calls convertFieldToType after that check. This branch replaced the same call with convertFieldToIndexType, which maps a parse error to a null Field so a literal outside the index type marks the index unusable instead of throwing. Resolved by keeping master's guard verbatim and applying only this branch's change to the conversion call. The two compose: the guard returns early before any conversion happens, and the tolerant conversion differs from the strict one only on the path that used to throw. Every added and removed line of this branch's diff is byte-identical before and after the merge (504 lines, same checksum); the merged tree differs from master only in the eight files this branch owns.
isJSONPathFilterSafe declined the JSONAllPaths index whenever convertFieldToType returned a null Field. That case is a literal with no exact representation in the cast target, such as CAST(j.a AS UInt8) = 999, and it is unrelated to the throw this branch fixes: before this branch the same predicate kept the index, so the extra clause was a regression. With force_data_skipping_indices naming the index it turned a query that returned zero rows into Code 277 INDEX_NOT_USED, and the test pinned that error as expected behaviour. Only a thrown conversion now declines the index, which is what the Enum literal needs. A null Field never reaches either caller: both use the bool and read the path name, not the converted value. The two numeric arms cover both index conditions that share the helper, and they assert the index stays usable. Restoring the clause makes them fail with Code 277 at the first one.
|
Merged master at I also removed an unintended change of my own. Noticed but not raising: |
The three conversion sites this branch made tolerant tested the thrown code with isParseError, which accepts 19 codes. Only UNKNOWN_ELEMENT_OF_ENUM is in scope, so the other 18 were swallowed too: an unparseable Date, DateTime, DateTime64, IPv4, IPv6, UUID or number literal, and INCORRECT_DATA or ARGUMENT_OUT_OF_BOUND, stopped propagating out of key and index analysis and silently returned no condition instead. The gtest FormatSharedInit.FilterInfoDoesNotLeakCallerContext reported this. It builds equals(dt, 'not-a-datetime') on a DateTime64(3) key and asserts that initKeyConditionOnce throws, which is the shape from the report the test was written for. CANNOT_PARSE_DATETIME is an isParseError code, so the atom returned false, the shared init no longer threw, and the test failed on all three sanitizer builds. Each site now compares against UNKNOWN_ELEMENT_OF_ENUM directly, so every other code keeps the behaviour it has on master. This also drops the Formats/ParseError.h include from three storage translation units, which no longer classify errors on behalf of the formats layer. Verified in both directions with the build id asserted to move. Before: the gtest fails at the FAIL() on caller 1. After: both FormatSharedInit cases pass and both 04862 tests still match their reference byte for byte, 127 and 25 lines. A master binary, which has no catch at all, dies on the first non-member comparison with Code 691 after 6 of the 127 lines, so the narrowed catch is still what carries the Enum literal.
|
The I had scoped the three tolerant conversions with
Verified in both directions on a debug build with the build id asserted to move: before, the gtest fails on caller 1; after, both I corrected the description, which still described the wider |
| } | ||
| catch (const Exception & e) | ||
| { | ||
| if (e.code() != ErrorCodes::UNKNOWN_ELEMENT_OF_ENUM) |
There was a problem hiding this comment.
This unconditional UNKNOWN_ELEMENT_OF_ENUM catch weakens validate_enum_literals_in_operators = 1 on every planner-only path that goes through KeyCondition. With force_primary_key = 1 or force_index_by_date = 1, the atom now becomes FUNCTION_UNKNOWN, so ReadFromMergeTree.cpp:3294 / MergeTreeDataSelectExecutor.cpp:712 can throw INDEX_NOT_USED before row evaluation ever gets a chance to raise the validation exception. The same regression is repeated in MergeTreeIndexBloomFilter.cpp:717 and MergeTreeIndexJSONSubcolumnHelper.cpp:145 for force_data_skipping_indices.
Please rethrow UNKNOWN_ELEMENT_OF_ENUM when validate_enum_literals_in_operators is enabled, and add a focused regression check for the forced-index settings. For example, SELECT count() FROM t_key WHERE e = '4' SETTINGS validate_enum_literals_in_operators = 1, force_primary_key = 1 should still fail with UNKNOWN_ELEMENT_OF_ENUM, not INDEX_NOT_USED.
There was a problem hiding this comment.
Measured on this head (9fda16ef) against the master snapshot this branch merged (82cfa6a).
The example does not reproduce. SELECT count() FROM t_key WHERE e = '4' SETTINGS validate_enum_literals_in_operators = 1, force_primary_key = 1 returns a byte-identical Code: 691 ... UNKNOWN_ELEMENT_OF_ENUM ... while executing function equals ... Const(size = 0, ...) on both arms, and so do the force_index_by_date and force_data_skipping_indices variants at all three sites cited, including the JSONAllPaths one. With the setting on, FunctionComparison<EqualsOp>::executeWithConstString throws while the planner dry-runs the filter header (FilterStep construction through ActionsDAG::updateHeader, hence the zero-row block in that message), which is upstream of every index condition, so none of the three catches is reached. EXPLAIN indexes = 1 and an empty table throw identically, so it is not row evaluation either. The one FunctionsComparison.h change here deletes an early return that sat before the setting check and applied only to !=, so the setting's own path is untouched.
The mechanism does appear where the comparison is not const-folded into the filter step: WHERE e = (SELECT '4') with those two settings gives INDEX_NOT_USED here and gave UNKNOWN_ELEMENT_OF_ENUM on master. I am keeping that, because a planning-time forced-index guard reporting before execution is not new: on master the identical subquery form already returns INDEX_NOT_USED when the Enum column sits outside the primary key, as does any unanalyzable predicate that would throw at row evaluation, for example WHERE throwIf(x > 0, 'boom') with force_primary_key = 1. With no index forced that shape still throws 691 here, and nothing turns a throw into a successful query: with the primary key actually used, execution reaches row evaluation and throws 691.
I did not add the suggested check. It returns 691 on master and on this head, with and without the rethrow proposed, so it cannot detect the behaviour it would protect.
CI finish ledger - 9fda16eCI is fully finished at this commit. One check failed, and it has an owner.
Not caused by this PR: the diff touches Session id: cron:our-pr-ci-monitor:20260826-220000 |
CI finish ledger - 9c3a8f1Every failure below has an owner: a fixing PR (mine or external), or a full-effort fix task
Session id: cron:our-pr-ci-monitor:20260908-170140 |
|
Fixing in #122672 |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fixes
UNKNOWN_ELEMENT_OF_ENUMbeing thrown when anEnumcolumn is compared with a string literal that is not one of its members, even thoughvalidate_enum_literals_in_operatorsis disabled by default. Previously the query was rejected if the column was in the primary key or partition key, or merely carried aminmax,setorbloom_filterindex, and!=was rejected for anyEnumcolumn. Closes #111545.Description
Closes: #111545
validate_enum_literals_in_operatorsis off by default and documents that non-member enum literals are then not validated, yet comparing anEnumcolumn with one threw, and whether it threw depended on physical layout. Two independent causes:Index analysis.
KeyCondition::extractAtomFromTreeconverts the literal with the throwingconvertFieldToType, leaving theisNull()handling right below it unreachable. Sinceminmaxandsetbuild aKeyConditionover the index expression, that one line served the primary key, the partition key and both indexes.bloom_filterrepeated the defect at four of its own sites, as did the JSON-subcolumn helper shared bybloom_filterandtokenbf_v1. The conversions now catch onlyUNKNOWN_ELEMENT_OF_ENUM, so a string naming no member declines the atom (full scan, never a wrong answer) while every other conversion error, including an unparseableDateTime64literal, propagates exactly as on master.An inverted guard. In
FunctionsComparison.h,!equals && not_equalsselectsnotEqualsalone, yet the value it guards,IsOperation<Op>::not_equals, was written to servenotEquals, so the tolerant branch could only ever return 0. Deleting the guard is the fix: any rewrite that keeps a condition there breaks the four ordered operators, for which both traits are false.Two corrections to the report, both re-measured.
e < '4'does not throw on a non-key column (the ordered operators all return 0), so there only!=was broken; and the column need not be in a key, since aminmax,setorbloom_filterindex suffices.e <=> '4'andisDistinctFrom(e, '4')were affected too.No query that previously succeeded changes its answer, and declining loses no pruning:
LIKEover anEnumkey never pruned before, since the converted field is anInt8that thelikeatom handler rejects. The tests assert that each index is still used for representable literals, and that the setting still rejects every operator when enabled.Validation
Every carrier measured on a debug build, before and after, each fixture carrying a positive control:
ORDER BY e= 'a'-> 1LIKE '%Beta%'use_partition_pruning = 0-> 500minmaxindex, no keyuse_skip_indexes = 0-> 0set(0)index, no keyuse_skip_indexes = 0-> 0bloom_filterindex, no keyuse_skip_indexes = 0-> 0bloom_filteroverArray(Enum),has/hasAny/hasAllhas(a, 'a')-> 1bloom_filteroverMap(Enum, ...)keys,mapContainsmapContains(m, 'a')-> 1JSONAllPathsbloom_filter/tokenbf_v1= 'y'-> 1, index used!=on any tableNOT (e = 'zzz')agrees<=>,isDistinctFrom< <= > >=on a non-key columnIN ('4', 'a')Each of the four hunks was reverted independently: every one reddens its own carrier and only its own carrier. The tests assert index usability through
force_data_skipping_indicesrather than row counts alone, so neither an over-broad decline nor a missing one can pass silently; four mutations were run and each reddens a new assertion.Nullable(Enum8),Nullable(Enum16)andEnum16keys covered, including a realNULLrow (NULL != '4'staysNULL;NULL <=> '4'is 0).LowCardinality(Enum)is not covered becauseDataTypeEnumdoes not overridecanBeInsideLowCardinality(), so the type cannot be constructed. 50 randomized runs of both new tests passed 100/100;01310_enum_comparison,03278_enum_in_unknown_value,04049_statistics_enum_invalid_valueand04539_enum_string_search_dictionarystay green.Workflow [PR]
Sync PR [sync-upstream/pr/114035]