jayzhan211 commented on code in PR #10391:
URL: https://github.com/apache/datafusion/pull/10391#discussion_r1591673537


##########
datafusion/expr/src/function.rs:
##########
@@ -84,6 +84,72 @@ impl<'a> AccumulatorArgs<'a> {
     }
 }
 
+/// `StateFieldsArgs` encapsulates details regarding the required state fields 
for an aggregate function.
+///
+/// - `name`: Name of the aggregate function.
+/// - `input_type`: Input type of the aggregate function.
+/// - `return_type`: Return type of the aggregate function. Defined by `fn 
return_type` in AggregateUDFImpl.
+/// - `nullable`: Indicates whether the field can be null.
+pub struct FieldArgs<'a> {
+    pub name: &'a str,
+    pub input_type: &'a DataType,
+    pub return_type: &'a DataType,
+    pub nullable: bool,
+}
+
+impl<'a> FieldArgs<'a> {

Review Comment:
   But like `name`, it includes arguments, not every time is the same, how do 
they get the correct field without `args.name`?



##########
datafusion/expr/src/function.rs:
##########
@@ -84,6 +84,72 @@ impl<'a> AccumulatorArgs<'a> {
     }
 }
 
+/// `StateFieldsArgs` encapsulates details regarding the required state fields 
for an aggregate function.
+///
+/// - `name`: Name of the aggregate function.
+/// - `input_type`: Input type of the aggregate function.
+/// - `return_type`: Return type of the aggregate function. Defined by `fn 
return_type` in AggregateUDFImpl.
+/// - `nullable`: Indicates whether the field can be null.
+pub struct FieldArgs<'a> {
+    pub name: &'a str,
+    pub input_type: &'a DataType,
+    pub return_type: &'a DataType,
+    pub nullable: bool,
+}
+
+impl<'a> FieldArgs<'a> {

Review Comment:
   But like `name`, it includes arguments, and not every time is the same, how 
do they get the correct field without `args.name`?



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