alamb commented on code in PR #12283:
URL: https://github.com/apache/datafusion/pull/12283#discussion_r1747789029


##########
datafusion/core/src/datasource/file_format/write/demux.rs:
##########
@@ -320,9 +324,11 @@ async fn hive_style_partitions_demuxer(
 fn compute_partition_keys_by_row<'a>(
     rb: &'a RecordBatch,
     partition_by: &'a [(String, DataType)],
-) -> Result<Vec<Vec<&'a str>>> {
+) -> Result<Vec<Vec<String>>> {

Review Comment:
   Maybe  you could at least use 
[`Cow`](https://doc.rust-lang.org/std/borrow/enum.Cow.html) to avoid causing a 
regression for `StringArrays` 
   
   I think it would be fine if existing functionality was unaffected but new 
features (aka partitioning on newly supported types) was not as fast as it 
could be
   
   We could treat the subsequent optimization of such new features as a follow 
on project



##########
datafusion/core/src/datasource/file_format/write/demux.rs:
##########
@@ -320,9 +324,11 @@ async fn hive_style_partitions_demuxer(
 fn compute_partition_keys_by_row<'a>(
     rb: &'a RecordBatch,
     partition_by: &'a [(String, DataType)],
-) -> Result<Vec<Vec<&'a str>>> {
+) -> Result<Vec<Vec<String>>> {

Review Comment:
   Maybe  you could use 
[`Cow`](https://doc.rust-lang.org/std/borrow/enum.Cow.html) to avoid causing a 
regression for `StringArrays` 🤔 
   
   I think it would be fine if existing functionality was unaffected but new 
features (aka partitioning on newly supported types) was not as fast as it 
could be
   
   We could treat the subsequent optimization of such new features as a follow 
on project



-- 
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