Jefffrey commented on code in PR #18934:
URL: https://github.com/apache/datafusion/pull/18934#discussion_r2563758128


##########
datafusion/expr/src/udaf.rs:
##########
@@ -209,6 +209,7 @@ impl AggregateUDF {
     }
 
     pub fn is_nullable(&self) -> bool {
+        #[allow(deprecated)]

Review Comment:
   ```suggestion
           #[expect(deprecated)]
   ```



##########
datafusion/expr/src/udaf.rs:
##########
@@ -1247,6 +1255,7 @@ impl AggregateUDFImpl for AliasedAggregateUDFImpl {
     }
 
     fn is_nullable(&self) -> bool {
+        #[allow(deprecated)]

Review Comment:
   ```suggestion
           #[expect(deprecated)]
   ```



##########
datafusion/expr/src/udaf.rs:
##########
@@ -1100,7 +1105,10 @@ pub fn udaf_default_return_field<F: AggregateUDFImpl + 
?Sized>(
     Ok(Arc::new(Field::new(
         func.name(),
         data_type,
-        func.is_nullable(),
+        #[allow(deprecated)]
+        {
+            func.is_nullable()
+        },

Review Comment:
   ```suggestion
           #[expect(deprecated)]
           func.is_nullable(),
   ```



##########
datafusion/expr/src/udaf.rs:
##########
@@ -532,6 +533,10 @@ pub trait AggregateUDFImpl: Debug + DynEq + DynHash + Send 
+ Sync {
     /// For example, aggregate functions like `COUNT` always return a non null 
value
     /// but others like `MIN` will return `NULL` if there is nullable input.
     /// Note that if the function is declared as *not* nullable, make sure the 
[`AggregateUDFImpl::default_value`] is `non-null`
+    #[deprecated(
+        since = "51.0.0",
+        note = "Use `return_field` instead with return_field.is_nullable()."
+    )]

Review Comment:
   ```suggestion
       #[deprecated(
           since = "52.0.0",
           note = "Use `return_field` instead with return_field.is_nullable()."
       )]
   ```



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