alamb commented on code in PR #16498: URL: https://github.com/apache/datafusion/pull/16498#discussion_r2160359663
########## datafusion/physical-expr/src/expressions/literal.rs: ########## @@ -66,8 +66,7 @@ impl Literal { value: ScalarValue, metadata: Option<FieldMetadata>, ) -> Self { - let mut field = - Field::new(format!("{value}"), value.data_type(), value.is_null()); + let mut field = Field::new("lit".to_string(), value.data_type(), value.is_null()); Review Comment: If we see string allocations on the hot path, perhaps we could do something like cache the FieldRef for each datatype or something 🤔 ########## datafusion/physical-expr/src/expressions/literal.rs: ########## @@ -66,8 +66,7 @@ impl Literal { value: ScalarValue, metadata: Option<FieldMetadata>, ) -> Self { - let mut field = - Field::new(format!("{value}"), value.data_type(), value.is_null()); + let mut field = Field::new("lit".to_string(), value.data_type(), value.is_null()); Review Comment: (As a follow on PR, to be clera) -- 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