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


##########
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:
   I quickly fixed it before noticing that there was already a PR
   
https://github.com/apache/datafusion/commit/82530608d6737c8d1906250dbe1aab6f426d47f4
   
   I think we can remove `GetFieldAccessSchema`, `get_accessed_field`.



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