HaoYang670 commented on code in PR #4234:
URL: https://github.com/apache/arrow-datafusion/pull/4234#discussion_r1026180988


##########
datafusion/optimizer/src/simplify_expressions/expr_simplifier.rs:
##########
@@ -760,6 +766,29 @@ impl<'a, S: SimplifyInfo> ExprRewriter for Simplifier<'a, 
S> {
                 },
             },
 
+            // unfold the expression round(source, n)
+            Expr::ScalarFunction {
+                fun: BuiltinScalarFunction::Round,
+                args,

Review Comment:
   >With this PR, the logical plan now has a complex expression that is 
specific to the DataFusion implementation. Dask SQL would have to undo the pow 
logic here to get back to the original parameters to round so that it can pass 
them to numpy.
   
   
   If the dask-sql has a physical execution to support `round(source, n)`, this 
could be a problem. 🤔
   
   
   
   > the logical plan now has a complex expression that is specific to the 
DataFusion implementation
   
   This is a little weird for me that the Datafusion logical plan should not be 
specific to Datafusion physical plan. 
   If this is the truth, why don't we seperate the Datafusion to be two 
projects?



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