kosiew commented on code in PR #23063:
URL: https://github.com/apache/datafusion/pull/23063#discussion_r3563660235


##########
datafusion/expr/src/expr.rs:
##########
@@ -930,21 +930,32 @@ pub struct ScalarFunction {
     pub func: Arc<crate::ScalarUDF>,
     /// List of expressions to feed to the functions as arguments
     pub args: Vec<Expr>,
+    /// Original source code location, if known
+    pub spans: Spans,

Review Comment:
   Could we avoid adding `spans` as a required public field on these expression 
structs?
   
   `ScalarFunction`, `AggregateFunction`, and `WindowFunction` are publicly 
constructible with struct literals. Adding a new required field means existing 
downstream code using those literals will no longer compile. 
`cargo-semver-checks` reports `constructible_struct_adds_field` for 
`ScalarFunction.spans`, `AggregateFunction.spans`, and `WindowFunction.spans`.
   
   Please keep the diagnostic span data outside these public struct layouts, or 
use another semver-compatible design. The new required public fields should be 
removed before this is merged.



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