File tree Expand file tree Collapse file tree
datafusion/datasource/src Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ( ) ) ;
You can’t perform that action at this time.
0 commit comments