Repository navigation
Fix text index direct read optimization with Nullable function arguments - #95078
Conversation
The text index direct read optimization replaces text-matching functions
like `hasAnyTokens(val, toNullable('FOO'))` with virtual columns. However,
when the original function returns `Nullable(UInt8)` (due to nullable
arguments), the virtual column was always created as `UInt8`, causing a
type mismatch error: "Unexpected return type from not. Expected
Nullable(UInt8). Got UInt8."
The fix wraps the replacement node with `toNullable` when the original
function returns a nullable type but the replacement doesn't.
Co-Authored-By: Claude Opus 4.5 <[email protected]>
|
All fuzzer failures are pre-existing issues, not introduced by the PR. Here's the breakdown:
Logical error: 'Unexpected return type from concat. Expected Nullable(String). Got String. Pre-existing: This exact error (STID: 1611-343c) has appeared on master on Jan 25, Jan 8, Dec 26, Dec 22, and other dates. It's the same class of error your PR fixes (nullable type mismatch), but in a different code path (JOINs with join_use_nulls).
Block structure mismatch in Pipe stream: different types (LowCardinality vs non-LowCardinality in Tuples)
Pre-existing: Known issue #93861. 20-70+ failures per day across master and PRs.
Pre-existing: Appeared on master on Jan 25, Jan 19, Jan 16, Jan 15, etc. CTE/alias resolution bug. |
…kHouse/ClickHouse into fix-text-index-nullable-direct-read
…kHouse/ClickHouse into fix-text-index-nullable-direct-read
The text index direct read optimization replaces text-matching functions like
hasAnyTokens(val, toNullable('FOO'))with virtual columns. However, when the original function returnsNullable(UInt8)(due to nullable arguments), the virtual column was always created asUInt8, causing a type mismatch error: "Unexpected return type from not. Expected Nullable(UInt8). Got UInt8."The fix wraps the replacement node with
toNullablewhen the original function returns a nullable type but the replacement doesn't.Changelog category (leave one):
See #88550 (comment)
Version info
26.1.1.872