2010YOUY01 commented on code in PR #15302: URL: https://github.com/apache/datafusion/pull/15302#discussion_r2004759346
########## datafusion/physical-plan/src/sorts/sort.rs: ########## @@ -278,12 +280,29 @@ impl ExternalSorter { MemoryConsumer::new(format!("ExternalSorterMerge[{partition_id}]")) .register(&runtime.memory_pool); + // Construct RowConverter for sort keys + let sort_fields = expr + .iter() + .map(|e| { + let data_type = e + .expr + .data_type(&schema) + .map_err(|e| e.context("Resolving sort expression data type"))?; + Ok(SortField::new_with_options(data_type, e.options)) + }) + .collect::<Result<Vec<_>>>() + .expect("Valid sort fields"); + + let converter = RowConverter::new(sort_fields) Review Comment: Updated in [399966b](https://github.com/apache/datafusion/pull/15302/commits/399966b4ecde93045a9e24d87ac9e1d7081cb6ad), I should have noticed it -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org