Repository navigation
Conversation
When one chunk promoted a column while another was still parsing it under
an older type, the second chunk joined its detected type with the
column's current type. With a typemap target outside the promotion order
(Int64 => Int32, or the documented Timestamp{Nanosecond} => DateTime)
that join is String, so a sparse column read Int32 serially and text in
most parallel reads (29 of 40 at 2 threads, 28 of 40 at 4). The conflict
was found under the old type and says nothing against the current one,
so the chunk now re-parses under the current type. Both drivers route
through _promotemapped.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1222 +/- ##
=======================================
Coverage 95.79% 95.79%
=======================================
Files 9 9
Lines 5566 5569 +3
=======================================
+ Hits 5332 5335 +3
Misses 234 234 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A parallel read could give a different column type than a serial read when
typemapmaps to a type outside the promotion order. Example: a sparse column that the sample sees as all-missing, withtypemap=Dict(Int64 => Int32)(or the documentedTimestamp{Nanosecond} => DateTime). Serially it readsInt32; in parallel it read as text in most runs:nsample=1Int64 => Int32, 2 tasks: runs giving text (of 40)Int64 => Int32, 4 tasksTimestamp{Nanosecond} => DateTime, 2 tasksTimestamp{Nanosecond} => DateTime, 4 tasksRoot cause: one chunk promotes the column (Missing → Int64, mapped to Int32) while another is still parsing it as Missing. The second chunk finds a value, detects Int64 from the type it parsed under, and joins that with the column's current type:
promote_kernel(Int32, Int64)is outside the order, so the column became String. That conflict was found under the old type and says nothing against Int32._promotemapped, which both the direct and the masked (Scan) driver call, now takes the type the chunk parsed under; when it is not the current type, the chunk re-parses under the current type. Retries stay bounded: each stale retry follows another chunk's promotion, and a column promotes at most a few times (the existing 8-attempt guard).Found by an independent review of #1221, which makes this window wider.
Verification:
gzip, typemap, ...testset: the table above's shape with both maps, one serial read and eight parallel reads that must match it in type and values. At 2 threads (CI's setting) main fails 14 of 18; this branch passes 18 of 18.--check-bounds=yes -t4: 331,796 passed.Not changed here: with a
typemap, a column mapped to Int32 that later meets a float becomes text, while a sample that saw the float gives Float64 (the inferred type then depends on the sample). That needs promotions to join on the unmapped type and is a separate decision.🤖 Generated with Claude Code