alamb commented on code in PR #10655:
URL: https://github.com/apache/datafusion/pull/10655#discussion_r1614536504


##########
datafusion/functions/src/core/getfield.rs:
##########
@@ -106,6 +106,9 @@ impl ScalarUDFImpl for GetFieldFunc {
         };
         let access_schema = GetFieldAccessSchema::NamedStructField { name: 
name.clone() };
         let arg_dt = args[0].get_type(schema)?;
+        if arg_dt.is_null() {
+            return Ok(DataType::Null);
+        }
         access_schema

Review Comment:
   Thanks @jayzhan211  
   
   I agree the change in 
https://github.com/apache/datafusion/commit/6cb45b5a9f2b53688a9754b1a7d06665ebd73a6d
 to inline things looks nice -- shall we make another PR?



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

Reply via email to