adriangb commented on code in PR #19137:
URL: https://github.com/apache/datafusion/pull/19137#discussion_r2598687754


##########
datafusion/datasource/src/table_schema.rs:
##########
@@ -70,7 +70,7 @@ pub struct TableSchema {
     ///
     /// These columns are NOT present in the data files but are appended to 
each
     /// row during query execution based on the file's location.
-    table_partition_cols: Vec<FieldRef>,
+    table_partition_cols: Arc<Vec<FieldRef>>,

Review Comment:
   I tried this but it:
   1. Is incompatible with your recommendation in 
https://github.com/apache/datafusion/pull/19137/files/fd79a3ba89e9c5d45796aa8fbb7782bf1413bde4#r2598642330
 because we can't do `Arc::make_mut(&mut Fields)` and `Fields` doesn't expose 
mutablility.
   2. It would require changing the public API of 
`TableSchema::partition_fields()`
   
   I also am not that worried about construction cost (that happens once in 
`FileSource`, it's the mutliple copies for each `FIleOpener` that worry me.
   
   In any case since the current change is fully backwards compatible API wise 
and is internally contained we can always come back and use `Fields` later, so 
I will leave that as a followup.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to