Repository navigation
Put the create_new_file_on_insert sequence number into the file name, not a directory - #129630
Conversation
…e, not a directory
With `s3_create_new_file_on_insert` (and the `azure_`/`hdfs_` analogues), when the
key already exists, the new key got the sequence number before the first dot of the
whole key. If a directory name contained a dot (e.g. `team.v1/data.tsv`, or a
`PARTITION BY` path like `part.{_partition_id}/data.tsv`), the file was written into
a new "directory" (`team.1.v1/data.tsv`) and was not visible to `team.v1/*`.
Now the number is inserted before the first dot of the last path component:
`team.v1/data.1.tsv`.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Workflow [PR], commit [1d6d7bc] Summary: ✅
AI ReviewSummaryPR #129630 fixes Final VerdictStatus: ✅ Approve. |
…endent of where the sequence number goes Related: #129630
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units7 translation units recompiled, 11 s compile time in total, 7 of them have a recent master baseline. |
alexey-milovidov
left a comment
There was a problem hiding this comment.
Trivial, LGTM.
With
s3_create_new_file_on_insert(andazure_create_new_file_on_insert,hdfs_create_new_file_on_insert), when the target key already exists,checkAndGetNewFileOnInsertIfNeededinserted the sequence number before the first dot of the whole key, usingkey.find_first_of('.'). When a directory name contains a dot, the number went into the directory:The second insert wrote
team.1.v1/data.tsv, a new "directory", sos3('http://host/bucket/team.v1/*')did not see it. The same happens withPARTITION BYwhen the partition id puts a dot into a directory name.Now the number goes before the first dot of the last path component, so the second insert writes
team.v1/data.1.tsv. Keys without a dot in a directory name are named the same as before.This changes the names of new files only for keys that have a dot in a directory name. That is intended: the old names put files outside the directory they were written to.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
With
s3_create_new_file_on_insert,azure_create_new_file_on_insertorhdfs_create_new_file_on_insert, the sequence number of a new file is now inserted before the first dot of the file name, not before the first dot of the whole path. Previously, if a directory name contained a dot (e.g.team.v1/data.tsv), the new file was written into a different directory (team.1.v1/data.tsv).🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/129630]
Version info
26.11.1.1575-master(included in26.11and later)