Skip to content

Compare array elements accurately in has/indexOf/countEqual - #117313

Merged
alexey-milovidov merged 7 commits into
masterfrom
fix-array-index-accurate-comparison
Sep 6, 2026
Merged

alexey-milovidov merged 7 commits into
masterfrom
fix-array-index-accurate-comparison

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Aug 31, 2026 •

Copy link
Copy Markdown
Member

Closes: #116928
Closes: #117316
Related: #115311
Related: #103521

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):

Fix has, indexOf and countEqual over an array of numbers returning a match for a needle that
equals does not consider equal — has(arr, -1) matched an Array(UInt64) element equal to the
UInt64 maximum, and has(arr, 16777217) matched an Array(Float32) element equal to 16777216.
The constant-array path already answered correctly, so the same haystack gave different results
depending on whether it was a constant or a materialized column. The same phantom matches were
returned for an Array(LowCardinality(T)) column, where the constant needle is resolved to a
dictionary index with a narrowing cast. That column also matched a needle its element type cannot
represent outside the numeric domain, such as a DateTime needle carrying a time of day that a
Date element does not, and reported every element equal to the element type's default value as a
match for a NULL needle. In the other direction, a needle counting a different unit than the
element -- a DateTime searched in an Array(Date), where days were compared against seconds --
was found nowhere although equals considers the pair equal, and although the
Array(LowCardinality(Date)) encoding of the same haystack did find it; such a pair is now compared
in the type the two meet in.

Description

ArrayIndexNumImpl::compare compared with a plain C++ == after an implicit cast, with
-Wsign-compare and -Wdouble-promotion suppressed. For a mismatched numeric pair that disagrees
with equals, which compares accurately: the integer side wraps for a sign mismatch, and the integer
side rounds for an int-vs-float pair.

The constant path (linearSearchConst) uses accurateEquals on Fields and returned the correct
answer, which is what made the two paths of one function disagree — the numeric analogue of #115311.

The default-on optimize_rewrite_array_exists_to_has rewrites arrayExists(x -> x = c, arr) into
has(arr, c), so a correct predicate turned into one returning phantom rows. Fixing has itself
rather than adding another guard to the rewrite pass also closes the constant-vs-column
inconsistency, as the issue notes.

compare and lessOrEqual now use accurate::equalsOp / accurate::greaterOrEqualsOp. For a
matching pair accurate::equalsOp is a == b, so nothing changes there; lessOrEqual drives the
binary search in lowerBound and has to stay consistent with compare. NaN behaviour is unchanged
(nan was and remains not found).

Array(LowCardinality(T))

An Array(LowCardinality(T)) column with a constant needle takes a separate fast path
(executeArrayLowCardinality) that compares dictionary indices instead of values, so it never
reaches the code above. LowCardinalityExecutionHelpers::dictionaryIndexForConstant narrows the
constant to the dictionary type with a plain castColumn and consulted the accurate
targetTypeRepresentsValue check only when that cast image collided with the dictionary's
default-value slot; an image colliding with any other entry was answered from getOrFindValueIndex
with no accuracy check. So has(a8, -1) over an Array(LowCardinality(UInt8)) holding 255 kept
returning a phantom row, at every integer width, and for Float32 as well.

The constant is now declined up front whenever the cast could not preserve it: a constant that did
not survive the cast equals no element, whichever slot its image happens to hit. The default slot is
no longer a special case — the single pre-lookup check replaces the one that ran only on a
default-slot collision — and the check is not confined to the numeric domain, because a cast loses
just as silently outside it:
has(materialize(CAST([toDate('2020-01-01')], 'Array(LowCardinality(Date))')), toDateTime('2020-01-01 00:00:05'))
was answered from the 2020-01-01 entry although the needle carries a time of day the element does
not.

Padding a String to a FixedString is not such a loss and is not treated as one: the two meet as
String, where the FixedString-to-String conversion trims exactly the padding the cast added, so
has(Array(LowCardinality(FixedString(3))), 'ab') still matches, as does an Enum8 needle against a
FixedString element, which meets as String too.

A NULL needle

The same fast path answered a NULL needle from dictionary_index = 0, but
ColumnUnique::getNestedTypeDefaultValueIndex is is_nullable ? 1 : 0: slot 0 is the null value only
in a nullable dictionary, and in a non-nullable one it holds the nested type's default value. So
has(materialize(CAST(['', 'a'], 'Array(LowCardinality(String))')), NULL) returned 1 where the plain
Array(String) path returns 0, countEqual over ['', 'a', ''] counted 2, and a numeric element
type behaved the same. A NULL needle is now declined unless the dictionary can hold one.

A needle counting another unit

Both paths that compare values read the two sides as the raw numbers they are stored as, and a
Date counts days while a DateTime counts seconds since the epoch, so
has(materialize(CAST([toDate('2024-01-01')], 'Array(Date)')), toDateTime('2024-01-01 00:00:00'))
compared 19723 against 1704067200 and returned 0, as did the constant-array path, which
compares Fields that carry no logical type either. equals brings such a pair to the type the two
meet in and returns 1, and so does IN.

The Array(LowCardinality(Date)) encoding of the same haystack resolves the constant needle by a
cast to the dictionary type and then checks that the constant survived it, which is equivalent to
comparing in the type the pair meets in, so that encoding returned 1 -- on master as well as here.
So it was the paths comparing values that were wrong, not the dictionary shortcut: keeping the pair
on the fallback path would have aligned the shortcut with the wrong answer and regressed it.

executeArrayImpl now brings a pair whose sides count different units -- days, seconds since the
epoch, seconds within a day -- to the type they meet in before comparing, and both the constant and
the materialized path funnel into it, so the constant array, the materialized array and the
dictionary now agree, on the answer equals gives. A needle the element does not represent is still
found nowhere: toDateTime('2024-01-01 00:00:05') meets an Array(Date) holding 2024-01-01 as
DateTime, where the element is midnight and the needle is not. indexOfAssumeSorted keeps its
binary search valid, because the conversion to the common type is monotonic.

The two counterexamples in the changelog entry are needles that equals calls absent and has
called present; this is the same defect with the signs reversed, a needle that equals calls present
and has called absent.

Tests

Test 05059_array_index_accurate_numeric_comparison covers both counterexamples on both paths, for
has/indexOf/countEqual, the arrayExists rewrite, the Array(LowCardinality(UInt8/UInt64/Float32))
column, and that matching and cross-width matching pairs still match. It also covers the
Date/DateTime counterexample beside its plain-array oracle, a Date32 needle that a Date
element represents exactly and must keep finding on a non-default slot, the String-to-FixedString
and Enum8-to-FixedString padding controls, and the NULL needle over a non-nullable and a
nullable dictionary. The references of 01414_low_cardinality_nullable and
04881_low_cardinality_default_value_needle move accordingly: both pinned the old phantom answer for
a negative needle over an unsigned LowCardinality element, and 04881 printed it beside the
plain-array oracle it now agrees with.

For the needle counting another unit the same test prints the constant array, the materialized array
and the dictionary side by side, with the equals and IN answers above them, for
has/indexOf/countEqual over Array(Date), Array(Date32) and Array(DateTime), in both
directions, for a non-constant needle, for a Nullable element and a NULL needle, and for the
intraday needle that must still be found nowhere. The reference of 03916_has_to_in does not move --
its Date-versus-DateTime row is a needle at midnight against an element at 12:34:56, so has
is still 0 while in is 1 and the rewrite still must not fire -- only the comment stating why.


Workflow [PR]
Sync PR [sync-upstream/pr/117313]

Version info

  • Merged into: 26.9.1.839 (included in 26.9 and later)

The vectorized numeric path compared an element to the needle with a plain C++ `==` after an
implicit cast, with `-Wsign-compare` suppressed. For a mismatched numeric pair that disagrees
with `equals`: `-1` wraps to the `UInt64` maximum, and `16777217` rounds to a `Float32`. The
constant-array path uses `accurateEquals` and returned the right answer, so the same haystack
gave different results depending on whether it was a constant or a materialized column.

The default-on `optimize_rewrite_array_exists_to_has` turns `arrayExists(x -> x = c, arr)` into
`has(arr, c)`, so a correct predicate became one that returns phantom rows.

Both `compare` and `lessOrEqual` now use `accurate::equalsOp`/`greaterOrEqualsOp`, which for a
matching pair is the same plain comparison as before. `lessOrEqual` drives the binary search in
`lowerBound` and has to stay consistent with `compare`.

Closes: #116928
@clickhouse-gh

clickhouse-gh Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [11744f2]

Summary: ✅


AI Review

Summary

This PR closes the original has/indexOf/countEqual mismatches for numeric arrays, the Array(LowCardinality(...)) fast path, and mixed Date/DateTime-family comparisons by aligning the array code with the same common-type semantics used by scalar comparison. The remaining concern is evidence: the final temporal fix now reaches more surfaces than the new regression actually exercises, so I do not think the review is complete without one more focused test pass.

Tests
  • ⚠️ [tests/queries/0_stateless/05059_array_index_accurate_numeric_comparison.sql:100] The new temporal branch now also covers Time/Time64 pairs and is the path indexOfAssumeSorted depends on for mixed temporal types, but the regression only exercises has/indexOf/countEqual on Date*/DateTime* arrays. Please add a small Array(Time/Time64) case and a mixed-temporal indexOfAssumeSorted case to prove the widened contract instead of leaving it only in comments.
Final Verdict

Needs one more focused regression before merge.

LLVM Coverage Report

Measured on commit 11744f2.

Metric Baseline Current Δ
Lines 88.80% 88.80% +0.00%
Functions 91.80% 91.80% +0.00%
Branches 81.10% 81.20% +0.10%

Changed lines: Changed C/C++ lines covered: 42/44 (95.45%) · Uncovered code

Full report · Diff report

@zlareb1

zlareb1 commented Aug 31, 2026

Copy link
Copy Markdown
Member

Verified the fix reasoning against the LowCardinality fast path and found an escape that survives this patch — filed as #117316 with full repros.

executeArrayLowCardinality (arrayIndex.h) short-circuits has/indexOf/countEqual for Array(LowCardinality(<numeric>)) columns with a constant needle before the code this PR fixes ever runs: the needle goes through dictionaryIndexForConstant (src/Functions/LowCardinalityExecutionHelpers.h), which converts it with a plain wrapping/rounding castColumn and consults the accurate targetTypeRepresentsValue check only when the cast image collides with the dictionary's default-value slot. A cast image colliding with any other dictionary entry is answered from getOrFindValueIndex with no accuracy check — the same phantom this PR removes from the vectorized path.

Verified on master and 24.8/25.8/26.8 (all wrong):

SET allow_suspicious_low_cardinality_types = 1;
CREATE TABLE m (id UInt8, a8 Array(LowCardinality(UInt8)), a64 Array(LowCardinality(UInt64)), af32 Array(LowCardinality(Float32))) ENGINE = MergeTree ORDER BY id;
INSERT INTO m VALUES (1, [255], [18446744073709551615], [16777216]), (2, [5], [5], [5]);
SELECT id FROM m WHERE has(a8, -1);          -- row 1, wrong
SELECT id FROM m WHERE has(a64, -1);         -- row 1, wrong
SELECT id FROM m WHERE has(af32, 16777217);  -- row 1, wrong
SELECT has(materialize([toUInt8(255)]), -1); -- 0, correct (non-LC path)

The UInt8 case separates the two paths cleanly: integer promotion makes even the pre-fix vectorized compare answer -1 = 255 correctly, so the phantom above can only come from the dictionary path. That also means every integer width is affected on the LC path (all verified), not just the beyond-int pairs this PR's counterexamples use. And since optimize_rewrite_array_exists_to_has rewrites over LowCardinality numeric arrays too, arrayExists(x -> x = -1, a8) returns the phantom row at defaults while SETTINGS optimize_rewrite_array_exists_to_has = 0 does not.

After this PR merges as-is, the non-LC column path becomes accurate while the LC path keeps the phantoms, so has(arr, needle) flips answers depending on whether the column is LowCardinality — worth covering here or in a follow-up. The fix locus is small: apply targetTypeRepresentsValue to every dictionary hit in dictionaryIndexForConstant, not only to the default-slot collision.

Comment thread src/Functions/array/arrayIndex.h Resolved
@clickhouse-gh

clickhouse-gh Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing 11744f273 with master 29b7f015d (stripped binary size, per-symbol sizes and ThinLTO time; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes

programs/clickhouse-stripped: smaller than the master baseline by the known offset between the two builds, so the difference is not shown. A delta that differs from the offset by more than 50% of it is shown, in either direction.

The official master build is compiled with -g and a pull request build is not, and XRay counts debug instructions towards its instrumentation threshold, so master instruments thousands of functions more and its binary is ~0.4% larger no matter what the pull request does.

Object file sizes

10 object files changed (+498.85 KiB total), 0 added.

Object file Master PR Δ
src/Functions/array/CMakeFiles/clickhouse_functions_array.dir/indexOfAssumeSorted.cpp.o 1.75 MiB 1.88 MiB +130.57 KiB (+7.27%)
src/Functions/array/CMakeFiles/clickhouse_functions_array.dir/FunctionsMapMiscellaneous.cpp.o 4.37 MiB 4.48 MiB +111.30 KiB (+2.49%)
src/Functions/array/CMakeFiles/clickhouse_functions_array.dir/indexOf.cpp.o 1.76 MiB 1.87 MiB +107.79 KiB (+5.98%)
src/Functions/array/CMakeFiles/clickhouse_functions_array.dir/countEqual.cpp.o 1.76 MiB 1.86 MiB +107.10 KiB (+5.95%)
src/CMakeFiles/dbms.dir/Functions/array/has.cpp.o 708.35 KiB 749.72 KiB +41.38 KiB (+5.84%)

716 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only clickhouse-bundle) and not compared.

Compile time of recompiled translation units

13 translation units recompiled, 93 s compile time in total, 13 of them have a recent master baseline.

Job report

…ionary path

`has`/`indexOf`/`countEqual` over an `Array(LowCardinality(T))` column with a
constant needle answer from the dictionary index instead of comparing values.
`dictionaryIndexForConstant` narrows the constant to the dictionary type with a
plain `castColumn`, which wraps `Int8(-1)` into `UInt8(255)` and rounds
`16777217` to a `Float32`, and it consulted the accurate
`targetTypeRepresentsValue` check only when that cast image collided with the
dictionary's default slot. An image colliding with any other entry was answered
from `getOrFindValueIndex` with no accuracy check, so the very phantom matches
this pull request removes from the vectorized path survived on
`LowCardinality` columns, and the default-on
`optimize_rewrite_array_exists_to_has` carried them into `arrayExists`.

Decline the constant up front whenever a numeric cast could not preserve it: a
constant that did not survive the cast equals no element, whichever slot its
image happens to hit. The check stays inside the numeric domain, because casting
a `String` to a `FixedString` pads it and the padded form is exactly the element
the function is meant to match.

Closes: #117316
@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 Thanks — all three repros are fixed here in ff39f2b, so #117316 is closed by this pull request rather than left as a follow-up.

dictionaryIndexForConstant now declines the constant before the dictionary lookup whenever a numeric cast could not preserve it, instead of only when the cast image collides with the default-value slot: a constant that did not survive the cast equals no element, whichever slot its image happens to hit.

The check is deliberately confined to the numeric domain (isNumber on both the needle and the dictionary type). Casting a String to a FixedString pads it, and the padded form is exactly the element the function is meant to match, so a representability check there would turn has(Array(LowCardinality(FixedString(3))), 'ab') into a miss. That control is now in the test, next to the numeric cases.

05059_array_index_accurate_numeric_comparison covers your a8/a64/af32 table for has, indexOf, countEqual, and arrayExists at defaults and with optimize_rewrite_array_exists_to_has = 0. Two existing references moved because they had pinned the phantom: 01414_low_cardinality_nullable (has(u8/u16/u32/u64, -1) went 1 → 0) and 04881_low_cardinality_default_value_needle, whose negative-needle row printed the disagreement with the plain-array oracle it now matches.

The nan divergence you did not raise is still there and still tracked separately — nan is one dictionary entry but is never equal to itself, and that is a property of the value comparison, not of the lookup.

@alexey-milovidov alexey-milovidov self-assigned this Sep 4, 2026
@clickhouse-gh clickhouse-gh Bot added the comp-regular-function Regular scalar functions: string processing, data conversion, arithmetic, math, comparison, condi... label Sep 4, 2026
…ld one

`dictionaryIndexForConstant` answered a `NULL` constant from `dictionary_index = 0` unconditionally,
but `ColumnUnique::getNestedTypeDefaultValueIndex` is `is_nullable ? 1 : 0`: slot 0 is the null value
only in a nullable dictionary, and in a non-nullable one it holds the nested type's default value.
Every element equal to that default was therefore reported as a `NULL`, so
`has(materialize(CAST(['', 'a'], 'Array(LowCardinality(String))')), NULL)` returned 1 where the plain
`Array(String)` path returns 0. It reached `indexOf` and `countEqual` too:
`countEqual(materialize(CAST(['', 'a', ''], 'Array(LowCardinality(String))')), NULL)` counted 2, and
the same held for a numeric element type, `has(materialize(CAST([0, 5], 'Array(LowCardinality(UInt8))')), NULL)`.

A `NULL` needle is now declined unless `nestedIsNullable`, which leaves a nullable dictionary finding
its `NULL` element in slot 0 as before.
…t, at any slot

The accurate `targetTypeRepresentsValue` check ran before the lookup only for a numeric pair, and
after the lookup only when the cast image collided with the dictionary's default-value slot. A cast
loses just as silently outside the numeric domain, and the slot an image lands on says nothing about
whether the constant survived the cast, so
`has(materialize(CAST([toDate('2020-01-01')], 'Array(LowCardinality(Date))')), toDateTime('2020-01-01 00:00:05'))`
was answered from the `2020-01-01` entry while the plain `Array(Date)` path answers 0. `indexOf` and
`countEqual` diverged the same way.

The two checks are now one, run before the lookup for every cast that changes the type, so the
default slot is no longer a special case: it is declined for the same reason as any other.

Padding a `String` to a `FixedString` needs no exception. The two meet as `String`, and the
`FixedString`-to-`String` conversion trims exactly the zero padding the cast added, so
`has(materialize(CAST(['ab'], 'Array(LowCardinality(FixedString(3)))')), 'ab')` still matches, as does
an `Enum8` needle against a `FixedString` element, which meets as `String` too. Both are now in
`05059_array_index_accurate_numeric_comparison`, together with the `Date`/`DateTime` counterexample
and a `Date32` needle that a `Date` element represents exactly and must keep finding.
`04881_low_cardinality_default_value_needle` already drove its `FixedString(4)`-needle and
`Enum8`-needle rows through this same predicate at the default slot, so applying it at every slot
reuses a check those rows exercise.
`has`/`indexOf`/`countEqual` read both sides as the raw numbers they are stored as, and a `Date`
counts days while a `DateTime` counts seconds since the epoch, so an `Array(Date)` holding
`2024-01-01` searched with `toDateTime('2024-01-01 00:00:00')` compared `19723` against
`1704067200` and found nothing. The constant-array path answered the same way, comparing `Field`s
that carry no logical type either. `equals` brings such a pair to the type the two meet in and calls
it equal, and so does `IN`.

The `Array(LowCardinality(Date))` encoding of the same haystack resolves the constant needle by a
cast to the dictionary type and then checks that the constant survived it, which is that same
comparison, so it did find the needle: one haystack answered differently depending on how it was
encoded. It was the paths comparing values that were wrong, not the dictionary shortcut, so
`executeArrayImpl` -- which the constant path, the materialized path and the `Map` path all funnel
into -- now brings a pair whose two sides count different units to the type they meet in before
comparing.

A needle the element does not represent is still found nowhere: `toDateTime('2024-01-01 00:00:05')`
meets an `Array(Date)` holding `2024-01-01` as `DateTime`, where the element is midnight and the
needle is not. `indexOfAssumeSorted` keeps its binary search valid, because the conversion to the
common type is monotonic.

`isTimeOrTime64` was declared for every argument type in `IDataType.h` but defined for none, so the
first caller outside a `WhichDataType` failed to link. It is now defined beside its neighbours.

Addresses #117313 (comment)

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
SELECT countEqual(materialize(CAST([NULL, 'a', NULL], 'Array(LowCardinality(Nullable(String)))')), NULL) AS lc, countEqual(materialize(CAST([NULL, 'a', NULL], 'Array(Nullable(String))')), NULL) AS oracle;
SELECT indexOf(materialize(CAST(['a', NULL, ''], 'Array(LowCardinality(Nullable(String)))')), '') AS lc, indexOf(materialize(CAST(['a', NULL, ''], 'Array(Nullable(String))')), '') AS oracle;

SELECT 'a needle counting another unit is compared in the type the pair meets in';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new mixed-unit branch is broader than the regression block here: executeDifferentDateTimeUnits now also serves Time/Time64 pairs (the new isTimeOrTime64 dependency exists only for that), and the same cast-to-common-type logic is what indexOfAssumeSorted relies on when the pair is temporal. This test only proves has/indexOf/countEqual on Date*/DateTime* arrays, so the epoch-prepending Time semantics and the "conversion is monotonic" claim for sorted arrays are still just asserted in prose. Please add a focused Array(Time/Time64) case and at least one indexOfAssumeSorted mixed-temporal case here.

@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Sep 6, 2026
Merged via the queue into master with commit 0bf532a Sep 6, 2026
174 checks passed
@alexey-milovidov
alexey-milovidov deleted the fix-array-index-accurate-comparison branch September 6, 2026 12:54
@robot-ch-test-poll robot-ch-test-poll added the pr-synced-to-cloud The PR is synced to the cloud repo label Sep 6, 2026
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Sep 7, 2026
One conflict, in the `Impl::Main` comparison block of `src/Functions/array/arrayIndex.h`:
master's ClickHouse#117313 dropped `constexpr` from `lessOrEqual(PaddedPODArray<Initial>, Result)` because
`accurate::greaterOrEqualsOp` is not constexpr, and this branch adds a `compare` overload for a
FixedString element against a zero-padded needle immediately above it. Kept both: master's
signature and body verbatim, our overload unchanged. The two changes are independent -- ClickHouse#117313
fixes the numeric compare, this branch adds the string-like one -- and `is_zero_padded_needle_v`
still excludes the new needle from `lowerBound`, where master's three `lessOrEqual` overloads
remain the only ordering comparisons.
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Sep 7, 2026
That cell asserted `has(v, unhex('6100')) = 1` over an
`Array(LowCardinality(FixedString(4)))` column, which the dictionary shortcut in
`LowCardinalityExecutionHelpers::dictionaryIndexForConstant` answers, not the comparison this
branch adds. Master's ClickHouse#117313 turned that shortcut's representability check from one that only
guarded the default dictionary slot into an unconditional decline, and a String needle whose own
tail is a zero byte does not survive the round trip through `FixedString(N)` that the check
measures: `'a\0'` casts to `'a\0\0\0'` and casts back as `'a'`, since the reverse conversion
trims every trailing zero rather than only the padding it added. So the shortcut now declines and
`has` answers 0 where `=` answers 1, measured identically on a pristine master build and on this
branch: the carrier is master's, not this change's.

The materialized-needle cell stays, as it does reach `executeFixedStringLeft` and does read 1
here against 0 on master.
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Sep 20, 2026
Master's ClickHouse#117313 landed in the same file and for the same class of defect: it
brought `has`/`indexOf`/`countEqual` closer to `equals` for native numbers
(`accurate::equalsOp` replacing the hand-rolled comparisons) and for date/time
types that count different units (`executeDifferentDateTimeUnits`, hooked at the
top of `executeArrayImpl`). Both of its insertion points sit right where this
branch adds its own erased-element dispatch, which is why the textual merge
could not place them.

Resolved as a union, with master's block kept where master put it: the
date/time arm stays first after `allowArguments`, this branch's `executeArray` /
`executeArrayAfterErasedEquality` / `tryGetDecayedCommonType` and the
erased-equality machinery follow, and both new includes are kept. The two arms
do not overlap: `dateTimeUnitOf` answers `NotDateTime` for an erased type, so
master's arm declines on every shape this branch handles, and the undecided-row
fallback still reaches it through `executeArrayAfterErasedEquality`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-regular-function Regular scalar functions: string processing, data conversion, arithmetic, math, comparison, condi... pr-bugfix Pull request with bugfix, not backported by default pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

3 participants