Commit 883a04e
committed
ClickHouse: triage fixes for DictGetVsJoin / FinalMerge / Cast (smoke ClickHouse#8 residuals)
DictGetVsJoin (6 reproducers): the oracle's invariant breaks on tables with
duplicate keys -- HASHED dictionary picks one value per key (last-write-wins
on init scan), ANY LEFT JOIN picks one matching right row per left key, but
the two can pick different rows. Add a pre-check that the key column is unique
in the source table; skip iteration when duplicates exist.
Cast (2 reproducers): codec breadth emitted bare Delta(N) / DoubleDelta / T64 /
Gorilla / FPC which CH rejects with 'does not compress anything'. These are
pure transformers, not compressors. Always chain with LZ4 (or ZSTD via the
existing chain option).
FinalMerge (1 reproducer): OPTIMIZE TABLE t FINAL on a table with ORDER BY
tuple() (empty) raises ORDER_BY_CANNOT_BE_EMPTY (Code 36 BAD_ARGUMENTS).
Absorb in the oracle's OPTIMIZE catch block.
TLPAggregate (9 reproducers): documented NaN+JOIN+SUM family (deferred,
already documented in CLAUDE.md / plan).
TLPWhere (1 reproducer): multi-table FROM with FULL/INNER/LEFT joins
producing 0 vs 1215 cardinality -- needs deeper investigation, possibly a
real CH analyzer bug. Left as-is for follow-up.1 parent 5537795 commit 883a04e
3 files changed
Lines changed: 38 additions & 16 deletions
File tree
- src/sqlancer/clickhouse
- gen
- oracle
- dict
- final_
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
192 | 196 | | |
193 | | - | |
194 | | - | |
195 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
196 | 201 | | |
197 | 202 | | |
198 | | - | |
199 | | - | |
| 203 | + | |
| 204 | + | |
200 | 205 | | |
201 | | - | |
202 | | - | |
| 206 | + | |
203 | 207 | | |
204 | 208 | | |
205 | 209 | | |
| |||
Lines changed: 20 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
87 | 107 | | |
88 | 108 | | |
89 | 109 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | 110 | | |
96 | 111 | | |
97 | 112 | | |
| |||
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
76 | 79 | | |
77 | 80 | | |
78 | 81 | | |
| |||
0 commit comments