Repository navigation
Read zero-padded and +-signed integers in the TSV family, as CSV already does - #113910
Conversation
In the `Escaped` and `Raw` escaping-rule family (`TSV`, `TSVRaw`, `TSKV`, and `CustomSeparated` at its default escaping rule) an integer column could not be read for any zero-padded or `+`-signed spelling, while every other text format reads the same bytes. Issue ClickHouse#5999, closed in 2019, still reproduced verbatim. The most visible form is inference contradicting its own reader: `DESCRIBE` on a file containing `-007` returns `Nullable(Int64)`, and `SELECT` on that same file then throws `CANNOT_PARSE_INPUT_ASSERTION_FAILED`. Unsigned spellings were shielded from the error only because inference demoted them to `String`, which in turn made TSV header auto-detection consume the first data row as a column name, so `007\n123\n456` counted 2 rows instead of 3. `readIntTextUnsafe` consumed an optional `-`, then short-circuited on the first `0` and returned that as the whole value, leaving the remaining digits in the buffer; and `+` was neither `-` nor a digit, so the digit loop read nothing and reported success with zero. Either way the caller found unread bytes where a delimiter belonged. Its own doc comment listed both gaps. The reader now skips a run of leading zeros and accepts a redundant `+`. Because a `+` is newly consumed as a sign, the reader also requires a decimal digit after one: without that, a field that is a lone `+` would read as the value zero, a wrong result this change would itself have introduced. Before it, the `+` was left unconsumed and the format layer refused the remainder, so end to end this moves `CANNOT_PARSE_INPUT_ASSERTION_FAILED` to `CANNOT_PARSE_NUMBER` for that one spelling. The `-` branch is deliberately left exactly as it was, including its existing end-of-input check. An earlier revision of this change required a digit after either sign, which also rejected a field that is a lone `-`. That is documented behaviour, not an accident: the `TabSeparated` format documentation states that when reading it is allowed to parse "a string consisting of just a minus sign as a zero" for signed types, and the generated page carries the same sentence. So `-` still reads as zero, `-\t1` still reads as the two columns zero and one, and `TSV` legitimately differs from `CSV` here, which never made that promise. All thirty-one `-`-first observations across the format-level and reader-level probes are byte-identical to master. The reader has one call site, `SerializationNumber::deserializeText`, but that is where many entry points converge, so the scope of the two halves differs. `SerializationNumber` overrides only the JSON and CSV entry points, routing those to the tolerant `readIntText` -- which is why they always worked and why CSV is used here as the oracle for every expected value. It overrides neither `deserializeTextQuoted` nor `deserializeTextRaw` nor `deserializeWholeText`, so `SimpleTextSerialization` sends all of them to the same `deserializeText`. The acceptance half is an improvement wherever it is reached. The lone-`+` rejection, being a rejection, reaches all of them: beyond the four named formats that is `Values` and `MySQLDump` through `deserializeTextQuoted`, and sixteen external `deserializeWholeText` consumers including query parameters, dictionary `null_value`, `Map` keys and bloom-filter keys. With the reader repaired, the schema-inference guard that forced a zero-padded integer to `String` had no premise left; its comment said it existed only because of this reader. That guard is @Avogar's ClickHouse#44522, whose stated premise was "Infer numbers starting from zero as strings in TSV as we cannot parse them as integer" -- exactly what this change falsifies. Its regression test `02514_tsv_zero_started_number` is re-baselined rather than deleted: `0123` now reads as `Nullable(Int64)` `123`, which is what CSV has always answered, so the test keeps asserting the same thing against the corrected expectation. Removing the guard also closes the row-loss symptom in the same change. `FormatSettings::allow_number_leading_zeros` and its single setter in hive partitioning go with it: the flag was a private opt-in to what everybody now gets, and hive behaviour is unchanged. On cost. An earlier reader-level benchmark over unpadded integers found the change free, but it structurally excluded the path this change lengthens, so it was redone as a sweep over the density of single-`0` fields, each delta measured against a same-binary control arm. That sweep found a real regression at every density, including at zero density where neither a zero nor a sign exists -- which is what located the cause. It is neither parsing feature: constructing `CANNOT_PARSE_NUMBER` inline for the digit-after-sign check grew the reader's stack frame from 8 to 72 bytes and its body from 85 to 143 instructions on every call. Throwing from an out-of-line `[[noreturn]]` helper, as this function's neighbour `throwReadAfterEOF` already does, restores the 8-byte frame and leaves +2.3% at 0% density rising to +6.8% at 50%, against a control-arm spread of 0.6% -- about half to three quarters of the regression recovered. Marking the branch `[[unlikely]]` on its own recovers nothing: measured, it emits the identical 72-byte frame. This deliberately does not route the caller to `readIntText`, which is the slower variant the doc comment contrasts against, so the specialized loop is kept. Also corrected: `ReadHelpers.h`'s comment on why the date/time readers avoid this function said it was because leading zeros were not supported. They now are; the surviving reason is that `readIntTextUnsafe` cannot check for overflow, which those call sites request explicitly.
Internal second-model review (click to expand)Reviewed at Second-model re-review: 0 findings ( Independent cold review: 0 blockers, 0 majors. Carriers were enumerated before reading the fix
💡 Two citations had rotted on master and are now symbolic. 💡 Noted, not blocking. The lone- 💡 One of my own findings was withdrawn within the round. I read "thirty-one Re-baselining a deliberately pinned behaviour was checked against its history: |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-4:20260807-203700 |
|
cc @Avogar @al13n321, could you review this? |
|
Workflow [PR], commit [bc11b04] Summary: ✅
AI ReviewSummaryThis PR repairs Final VerdictStatus: ✅ Approve LLVM Coverage ReportMeasured on commit bc11b04.
Changed lines: Changed C/C++ lines covered: 98/100 (98.00%) · Uncovered code |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units1920 translation units recompiled, 12382 s compile time in total, 1920 of them have a recent master baseline. |
CI finish ledger - 1fff73fCI is fully finished on this head: 175 check-runs, 0 queued/in progress,
Neither failure is caused by this PR. The diff touches integer/decimal text parsing ( Session id: cron:our-pr-ci-monitor:20260809-023000 |
Avogar
left a comment
There was a problem hiding this comment.
Let's also check if the docs in TabSeparatedRowInputFormat.cpp are now correct and represent what code actually does
| if (!is_digit()) | ||
| { | ||
| x = 0; | ||
| return ReturnType(true); | ||
| } |
There was a problem hiding this comment.
This early return looks not needed. And for cases like 007 it will lead to just additional check or is_digit. The code below will do the same as this does,
There was a problem hiding this comment.
Agreed, and I removed the whole if (*buf.position() == '0') block rather than only the early return: once the reader stops short-circuiting at the first zero, the digit loop covers a run of zeros by itself, because multiplying a zero accumulator by ten leaves it zero. Re-measured on the 18 sign spellings in the gtest and every 04812 group: 0, 00, 007, -007, +007, 0123 and 000000000000000000007 produce the same values and consume the same bytes as the version you reviewed, and the reference file did not move outside the two groups I edited for the inference revert.
One consequence to flag, since master put that branch there deliberately: it also drops master's dedicated return for a lone 0. In the reader-level release-build benchmark I ran earlier on this PR (2M values, minimum of 11 repetitions), master measured 1.03 ns/value on a column of nothing but 0 against 12.99 ns/value on multi-digit fields. What the loop costs for a single 0 is one iteration plus the final sign cast instead of an immediate return, and I have not timed that separately. If you would rather keep the fast path, I will put the single-zero return back and leave padded values to the loop.
Review decision on ClickHouse#113910: a leading zero carries information in the TSV family (zip codes, phone numbers), so a zero-padded field must keep inferring String. `EscapingRuleUtils.cpp`, `FormatSettings.h`, `HivePartitioningUtils.cpp` and the two inference tests are restored to master, leaving only the value reader and its tests. `DESCRIBE` on a file of `-007` still returns `Nullable(Int64)`, and reading it is what this change repairs. `readIntTextUnsafe` no longer special-cases a leading '0' at all. Once the reader keeps reading past the first zero, the digit loop covers a run of them by itself, because multiplying an accumulator of zero by ten leaves it zero: `007` and `000000000000000000007` both read 7 through the loop. This also removes the early return master had for a lone '0'. The `TabSeparated` format documentation already promised that a `+` at the beginning is ignored when parsing, which the family only now honours; leading zeros join the same list of parsing leniencies.
Docs check on
|
| documented claim | master | this branch |
|---|---|---|
an extra + at the beginning is ignored when parsing |
not honoured: +7 throws Code: 27 |
+7 reads 7 |
| non-negative numbers cannot contain the negative sign | -7 into UInt64 rejected |
unchanged |
| an empty string reads as zero | reads 0 |
unchanged |
| for signed types, a field of just a minus sign reads as zero | reads 0 |
unchanged |
| numbers that do not fit may be parsed as a different number | wraps silently | unchanged |
So that paragraph was already documenting the + behaviour that only this PR implements, and every other sentence in it still describes the code. The one case it never mentioned is leading zeros, which are now accepted, so I added them to the same list of parsing leniencies in the same sentence. I did not touch docs/reference/formats/TabSeparated/TabSeparated.mdx: its copy of this text sits inside the generated region, which the docs check refuses direct edits to and the nightly docs job regenerates from this string.
Also in this push, with details in the two review threads: the schema-inference change is dropped and inference is byte-identical to master, the redundant zero block in readIntTextUnsafe is gone, and the description and changelog entry are rewritten for the narrower scope.
The leading-zero guard in `tryInferDataTypeByEscapingRule` fires only when the field's first character is `0` and the inferred type is an integer, so it looks past neither a sign nor a zero-leading float. `DESC format(TSV, '+007')` and `DESC format(TSV, '-007')` return `Nullable(Int64)` here exactly as they do on master, and the reader change then returns 7 and -7 for them where master threw `Code: 27`. `CSV` returns those same values, and types a plain `007` as `Int64` as well, so the padded-identifier protection is and always was `TSV`-family and first-character only. The comment, the test group and the changelog claimed the protection covered any zero-padded field, which is more than the code does. Reword them to the rule the guard implements, and pin `+007` next to the `-007` arm that already covered the signed spelling. Also trim the minus-branch comment in the gtest: the reason the sign branches cannot both fire, and what the value would have been if they could, is history for this message rather than an invariant the next reader of those assertions needs, and the cited line number in another file rots. Co-Authored-By: Claude Opus 5 <[email protected]>
CI finish ledger - 5df1d93Every failure below has an owner: a fixing PR (mine or external), or a full-effort fix task
Session id: cron:our-pr-ci-monitor:20260910-053056 |
`SerializationNumber<T>::deserializeText` is where the `Quoted` rule converges with `Escaped` and `Raw`, and `SimpleTextSerialization` routes `deserializeWholeText` into it as well, so the change reaches callers beyond the four formats the test already covered. That reach was claimed in the PR text with nothing asserting it. Group 13 pins one end-to-end carrier per route: `MySQLDump` for `Quoted`, a query parameter for `Escaped` (only `_request_body` takes the whole-text path), and a dictionary `null_value` for whole text. On master those three fail with CANNOT_PARSE_INPUT_ASSERTION_FAILED, BAD_QUERY_PARAMETER and UNEXPECTED_DATA_AFTER_PARSED_VALUE. `Values` reaches the same reader but its result is unchanged at default settings, because a value the streaming parser rejects is re-read by the SQL expression parser, which is also what reports the error there (a lone `+` fails as SYNTAX_ERROR on both sides). One spelling does move: with input_format_values_deduce_templates_of_expressions = 0, a padded or `+`-signed value that overflows the target column used to reach that fallback and default to 0, or raise TYPE_MISMATCH under input_format_null_as_default = 0, and now wraps in the reader exactly as the unpadded spelling always did. Both spellings are pinned next to the unpadded control, since this reader has never checked overflow.
… string
`convertFieldToType` re-reads a string literal with `deserializeWholeText`
before comparing it with a numeric column, so the reader this PR changes is
reached from SQL and not only from a format. Measured against master at the
merge base: `WHERE v = '007'` and `WHERE v = '+7'` raised TYPE_MISMATCH
("Cannot convert string '007' to type Int64") and now return the row, and the
same conversion runs during planning, so `EXPLAIN indexes = 1` on a key
predicate moved from that exception to `Condition: (id in [7, 7])`. A
`bloom_filter` index over the compared column is reached the same way.
`toInt64('007')` already returned 7 on master, so the comparison was the
outlier and now agrees with the cast beside it, which is why the cast is the
oracle in this group the way `CSV` is in the earlier ones.
The two index assertions name the key condition and the index, not the part and
granule counts beside them, because those move with the `index_granularity` the
test runner randomizes over 1..65536. `use_skip_indexes` needs no pin: the
runner does not randomize it and its default is already 1.
Review asked whether requiring a digit after the sign changes the public
error contract for the callers that reach this reader outside a format.
It does, for one input: `convertFieldToType` remaps only
UNEXPECTED_DATA_AFTER_PARSED_VALUE and ATTEMPT_TO_READ_AFTER_EOF to
TYPE_MISMATCH, and ReplaceQueryParameterVisitor raises
BAD_QUERY_PARAMETER only when a parse succeeds and leaves bytes behind,
so `WHERE i = '+'` moves from TYPE_MISMATCH to CANNOT_PARSE_NUMBER and
`{p:Int64}` = `'+'` from BAD_QUERY_PARAMETER to the same. Both spellings
already failed; only the code and message move.
Neither carrier normalises a reader error code, so this is not a new
class on either route. A Float64 target answers CANNOT_PARSE_NUMBER for
the identical value before and after this change, and an empty or
sign-only Int64 query parameter already propagated
ATTEMPT_TO_READ_AFTER_EOF. What changed is which branch the value takes:
the reader used to parse a lone `+` as zero and leave the sign for a
downstream leftover-byte check to reject, and now refuses it outright.
The float rows are the control and read identically on both sides, so
the group fails if either the integer rows stop reporting the reader
code or the float rows start disagreeing with them.
Group 14 read the `Condition:` and `Name:` rows straight out of `EXPLAIN indexes = 1`, which only describes a local read. The `ParallelReplicas` stateless lane enables parallel replicas in the default profile and the runner randomizes `parallel_replicas_local_plan` independently of that, so the same two assertions met two different plans: with a local plan the rows are nested under the remote step behind a box-drawing prefix that `trimBoth` does not strip, and without one there is no local read to analyse, so both rows are missing. Recapturing the reference would only move the dependence, since the prefix width follows the nesting depth. Pinning `enable_parallel_replicas = 0` on the two queries keeps the assertion in the plan shape where the property it asserts exists. The reference is unchanged, and the rows still disappear if the primary key condition or the skip index name does.
…g rules Group 13 named its carriers by format, which undercounts them, because the set is open: `SimpleTextSerialization` funnels `deserializeWholeText` and the `Escaped`, `Raw` and `Quoted` rules into one `deserializeText`, so a carrier moves exactly when it uses one of those, and only the `CSV` and `JSON` overrides stay put. Group 16 therefore pins one witness per mechanism rather than per format name. Measured on a debug build of this branch against master at the merge base c108e27, the server's Build ID asserted against the binary before every verdict. Each target is `Int64`, master -> this branch: JSONStringsEachRow "007" / "+7" / "-007" 632 -> 7 / 7 / -7 JSONCompactStringsEachRow ["007"] / ["+7"] 632 -> 7 / 7 ...WithNamesAndTypes ["007"] 632 -> 7 Form a=007 632 -> 7 Regexp capture group, Raw rule 632 -> 7 CAST('[007]' AS Array(Int64)) 130 -> [7] CAST('(007)' AS Tuple(Int64)) 27 -> (7) m.key_007 of Map(Int64, String) 47 -> resolves `JSONStringsEachRow` and the three `JSONCompactStringsEachRow` spellings are the complete set of input formats that set `yield_strings`; `JSONStrings` and `JSONCompactStrings` are output-only, so they cannot carry this. Their unquoted siblings are the control and read 7 on both sides, which is what makes the discriminator `yield_strings` rather than JSON. Five negative controls, one per new row, each pinning master's own code there, each reddens the test and is restored byte-identical, so the assertions discriminate the arms in both directions. 25 randomized runs green, plus input_format_parallel_parsing, input_format_null_as_default, input_format_json_empty_as_default and input_format_defaults_for_omitted_fields pinned at both values.
`format(Values, ...)` with `input_format_values_deduce_templates_of_expressions = 0` hands a value its streaming parser rejects to `parseExpression`, which defaults an overflowing literal under `input_format_null_as_default = 1` and reports TYPE_MISMATCH under `= 0`. The reader now consumes `(0128)` and `(+128)` itself, so both arms move, and group 13 pinned only the first: measured on `Int8`, master answers 0 / 0 / -128 with defaulting on and TYPE_MISMATCH / TYPE_MISMATCH / -128 with it off, this branch -128 for all six. The three existing rows name `input_format_null_as_default = 1` instead of inheriting it, so the two arms read as a pair. `tests/clickhouse-test` randomizes neither setting, and a query-level value wins over a session-level pin, checked in both directions; each new row was also negative-controlled against master's own answer. Group 15 gains two carriers that wrap the reader's error in a code of their own, so its claim is witnessed rather than asserted: a lone `+` in `Values` is SYNTAX_ERROR from the SQL parser it falls back to, and a `Map` subcolumn whose key does not read as a number is UNKNOWN_IDENTIFIER from name resolution. Both are identical on master, which is what makes them controls; the nine other carriers measured report the reader's CANNOT_PARSE_NUMBER. The set of wrappers is not closed either: `RegExpTreeDictionary::parseStringToField` catches everything and reports INCORRECT_DICTIONARY_DEFINITION, and a stateless test cannot reach it without a YAML source, so neither the test nor the description claims an exhaustive list. The unit test gains that boundary as a test of its own: `is_digit` calls `eof`, so the digit a `+` requires can be the first byte of the next buffer. Every earlier plus assertion used a single buffer, so an implementation checking only pending data would reject a valid `+7` at a chunk boundary with all of them still green; measured, replacing that `eof` with `hasPendingData` reddens the new test alone. Reported by clickhouse-gh[bot] on ClickHouse#113910.
Avogar
left a comment
There was a problem hiding this comment.
Please update the changelog entry - it's too big and verbose. You can keep something as PR description, but changelog entry should be compact.
|
Done: the changelog entry is now four sentences (the format fix, the shared reader, the lone One thing before merge: my own new test |
Group 16 read `m.key_007` off a subquery's own column, and the `old analyzer` stateless lane resolves a subcolumn against a storage only, so that row failed there with `Code: 47 Unknown column: m.key_007` on every rerun. The plain spelling `m.key_7` fails identically in that lane, so the gap is the fixture, not the key text this change teaches the reader to parse. The map now lives in a `Memory` table, which both analyzers resolve, and the row selects the padded spelling beside the plain one so a single row asserts that the two name the same key. Measured against the merge base `c108e273b6087`: the row is `Code: 47` there at `enable_analyzer` 1 and 0, and answers `x` twice here at both, so it still witnesses the reader change and now witnesses it in both lanes. Group 15's negative `m.`key_+`` row moves to the same table and keeps `UNKNOWN_IDENTIFIER` at both values. Validated with 20 runs at the default analyzer, 10 at `enable_analyzer = 0`, and the two statements inside a real `Replicated` database at `enable_analyzer = 0`, which is the other half of the failing lane. Four negative controls redden the file: the subquery fixture restored (red at `enable_analyzer = 0`, green at the default, which is the CI failure exactly), each of the two columns pointed at an absent key, and a wrong expected code on the group 15 row. The reference gains one field and no line.
|
Both The old-analyzer failure was my test's fixture, not the parser: the row read the The I will report here once both flavours re-run green. |
CI finish ledger - 745ed5cEvery failure below has an owner: a fixing PR (mine or external), or a full-effort fix task Keeping the promise from my previous comment: both llvm-coverage flavours that carried
Session id: cron:our-pr-ci-monitor:20260911-223036 |
…t-leading-zeros-and-plus
…nditional merge The branch carried a negative-integer provenance subsystem and an unconditional escaped-rule merge override across seven files. Measured against master, neither earns its place. The unconditional override runs transformIntegers, which widens every unmarked Int64 to UInt64. TSKV `x=-1` / `x=18446744073709551615` therefore went from a readable Nullable(String) to an unreadable Nullable(UInt64) (Code 27). That regression is self-inflicted: the provenance subsystem existed to undo it, not to fix anything master gets wrong. The provenance record also cannot reach the format the branch claimed it fixed. TabSeparatedSchemaReader passes no JSONInferenceInfo and inherits the no-provenance transform, so no marking made from a TSV field is ever consulted. What the subsystem does reach - CustomSeparated, Regexp, Template - is a separate defect with its own owner question, and its code stays in this branch's history. The `+`-demotion half is removed too: merged ClickHouse#113910 fixed readIntTextUnsafe, so master now reads `+007` and pins it as Nullable(Int64) in 04812. Keeping the demotion would fail that test. What remains is the defect itself, in two files. The schema reader reads the raw field, so inference answers for the bytes readRow parses. Reading raw makes a null-representation field infer Nullable(Nothing) rather than nothing at all, so a null row now takes part in the cross-row merge, where a null and a container have no plain supertype and this format's String default would discard the container type. A merge override scoped to that pair keeps it: master's merger runs first and its answer is kept whenever it resolves the pair, so only a pair it leaves unequal with a null on one side is rescued. Related: ClickHouse#113910 Co-Authored-By: Claude Opus 5 <[email protected]>
|
@Avogar The nightly SQLancer found two unexpected As
A The fuzzer matches with Two questions:
I am not proposing to change the reader. Reports: arm_asan_ubsan and arm_release. |
|
Second instance of question 1 above, different root cause, so a different remedy. Question 2 is untouched by this. Tonight's
Each one throws from the same frame: The oracle picks that column because the server now reports an exact integer type for it, which is true, and its expected-error set has no entry for this class. Note the failure is not in the CTE: the cast happens in the base table scan, so both sides of the The fix I would make is fork-side, and it is a predicate rather than an error-list entry. Whitelisting @fm4v may I send that to One separate note, since it is your script too: Reports: arm_release and arm_asan_ubsan. |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Integers in the
TSV,TSVRaw,TSKVandCustomSeparatedformats can now be zero-padded (007) or carry a redundant leading+(+7), spellings that previously failed to parse but thatCSValready accepted. The same reader serves other conversions from text to an integer, soWHERE i = '007'on a numeric column, query parameters andCAST('[007]' AS Array(Int64))accept them too. A field that is a lone+remains an error, now reported asCANNOT_PARSE_NUMBERon every one of these routes instead of a route-specific code. Schema inference is unchanged:007still infers asString.Description
Related: #5999 (closed in 2019, still reproducing)
Related: #113158 (same family)
readIntTextUnsafeshort-circuited on the first0, returning it as the whole value, and treated+as neither sign nor digit, so it reported success with zero and left unread bytes where a delimiter belonged. Its one call site,SerializationNumber<T>::deserializeText, is where theEscaped,RawandQuotedrules anddeserializeWholeTextconverge;CSVandJSONoverride it for the tolerantreadIntText.The reader now reads the whole field, leading zeros included, and accepts a redundant
+; that branch requires a digit, or a lone+would read as0. The-branch and inference's own first-character guard are untouched, so lone-minus spellings,TSVRawincluded, and inferred types are unchanged.The reader is shared, so the same spellings are now read by
MySQLDump,Form,Regexp, theJSONStringsEachRowfamily, query parameters, a dictionarynull_value, a cast such asCAST('[007]' AS Array(Int64)), aMapkey named in a subcolumn, andWHERE i = '007'on a numeric column, which raisedTYPE_MISMATCHand now converts, so the predicate also reaches primary-key and skip-index analysis. Unchanged:CSVandJSON, a lone-(read as0, rejected inTSVRaw), inferred types, andValuesat default settings; withinput_format_values_deduce_templates_of_expressions = 0a padded value that overflows the target now wraps like the unpadded spelling, instead of defaulting to0, or failing withTYPE_MISMATCHunderinput_format_null_as_default = 0.Most carriers pass the reader's error code through; one that wraps or retries the read reports its own, as
Valuesand aMapsubcolumn do in group 15. Groups 13 to 16 witness one route per mechanism.Validation
Debug build of this branch against master at the merge base, the fixed binary's Build ID asserted against the running server before any verdict:
a Int64007/00/03242Code: 27-007/-0100Code: 27+7/+007Code: 27+(with a delimiter)Code: 27Code: 72Code: 72-(with a delimiter)00(unchanged)Code: 72-\t1, two columns0 10 1(unchanged)Code: 72-inTSVRaw, any positionCode: 32Code: 32(unchanged)Code: 72-7asUInt64DESCRIBEof007StringString(unchanged)Int64WHERE i = '007'or'+7'Code: 53toInt64: 7 on bothWHERE i = '+'/{p:Int64}'+'Code: 53/457Code: 7272on bothEXPLAIN indexes = 1, key= '007'Code: 53id in [7, 7]JSONStringsEachRow/Form/RegexpCode: 632CAST('[007]' AS Array(Int64))/TupleCode: 130/27[7]/(7)m.key_007ofMap(Int64, String)Code: 47The
-rows named without a format hold alike inTSV,TSKVandCustomSeparated, forInt8throughInt256;TSVRawis the one format that rejects a lone-, identically on both sides, whichever delimiter or end of input follows, because the raw path hands the reader the field bytes alone. On baseTSVRawreportsCode: 632where the other three reportCode: 27. Float spellings and every--first observation are byte-identical to base.04648and02514pass against the untouched inference guard,04812passes 20 randomized runs, and 49 of the 51 tests in the TSV, TSKV, CustomSeparated and hive slice pass (two need minio, absent here). Style legs run locally.Workflow [PR]
Sync PR [sync-upstream/pr/113910]
Version info
26.9.1.1524(included in26.9and later)