alamb commented on code in PR #8093:
URL: https://github.com/apache/arrow-datafusion/pull/8093#discussion_r1391205564


##########
datafusion/substrait/src/logical_plan/producer.rs:
##########
@@ -1025,7 +1025,53 @@ pub fn to_substrait_rex(
             col_ref_offset,
             extension_info,
         ),
-        _ => not_impl_err!("Unsupported expression: {expr:?}"),
+        Expr::IsNull(arg) => {
+            let arguments: Vec<FunctionArgument> = vec![FunctionArgument {
+                arg_type: Some(ArgType::Value(to_substrait_rex(
+                    arg,
+                    schema,
+                    col_ref_offset,
+                    extension_info,
+                )?)),
+            }];
+
+            let function_name = "is_null".to_string();
+            let function_anchor = _register_function(function_name, 
extension_info);

Review Comment:
   @tgujar  if you hav time, it would also be awesome if you could make a PR 
that renames this variable (and other uses of `_register_function` to 
`function_reference` which I think would make the code cleaner



##########
datafusion/substrait/src/logical_plan/producer.rs:
##########
@@ -1025,7 +1025,53 @@ pub fn to_substrait_rex(
             col_ref_offset,
             extension_info,
         ),
-        _ => not_impl_err!("Unsupported expression: {expr:?}"),
+        Expr::IsNull(arg) => {
+            let arguments: Vec<FunctionArgument> = vec![FunctionArgument {
+                arg_type: Some(ArgType::Value(to_substrait_rex(
+                    arg,
+                    schema,
+                    col_ref_offset,
+                    extension_info,
+                )?)),
+            }];
+
+            let function_name = "is_null".to_string();
+            let function_anchor = _register_function(function_name, 
extension_info);

Review Comment:
   @tgujar  if you have time, it would also be awesome if you could make a PR 
that renames this variable (and other uses of `_register_function` to 
`function_reference` which I think would make the code cleaner



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

Reply via email to