Skip to content

Commit e0455b5

Browse files
adriangbclaude
andcommitted
docs: note that apache#19137 chose append; replace is the original behavior
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent ee71d0c commit e0455b5

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

datafusion/datasource/src/table_schema.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,13 @@ impl TableSchema {
150150
// isolation is automatic). The previous `Arc::get_mut().expect()`
151151
// appended in place and panicked whenever the `Arc` was shared, since
152152
// owning `self` does not imply sole ownership of the inner `Arc`.
153+
//
154+
// Note: this setter originally replaced the partition columns. #19137
155+
// switched it to append (when introducing the inner `Arc`), but that
156+
// was just picking *a* behavior for repeated calls — appending is not
157+
// required or more correct than replacing. Replacing matches the usual
158+
// `with_*` builder convention and avoids accidentally duplicating
159+
// columns, so we restore it here.
153160
self.table_partition_cols = Arc::new(partition_cols);
154161
let mut builder = SchemaBuilder::from(self.file_schema.as_ref());
155162
builder.extend(self.table_partition_cols.iter().cloned());

0 commit comments

Comments
 (0)