kumarUjjawal commented on code in PR #19220:
URL: https://github.com/apache/datafusion/pull/19220#discussion_r2602525190


##########
datafusion/spark/src/function/bitwise/bit_get.rs:
##########
@@ -83,7 +83,13 @@ impl ScalarUDFImpl for SparkBitGet {
     }
 
     fn return_type(&self, _arg_types: &[DataType]) -> Result<DataType> {
-        Ok(DataType::Int8)
+        internal_err!("return_field_from_args should be used instead")
+    }
+
+    fn return_field_from_args(&self, args: ReturnFieldArgs) -> 
Result<FieldRef> {
+        // Spark marks bit_get as null-intolerant: result is nullable only if 
an input can be null

Review Comment:
   Would `Spark derives nullability for BinaryExpression from its children` be 
more appropriate comment?



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