msathis commented on a change in pull request #288:
URL: https://github.com/apache/arrow-datafusion/pull/288#discussion_r630073584



##########
File path: datafusion/src/optimizer/constant_folding.rs
##########
@@ -200,6 +209,15 @@ impl<'a> ExprRewriter for ConstantRewriter<'a> {
                     Expr::Not(inner)
                 }
             }
+            Expr::ScalarFunction {
+                fun: BuiltinScalarFunction::Now,
+                ..
+            } => Expr::Literal(ScalarValue::TimestampNanosecond(Some(
+                self.execution_props
+                    .query_execution_start_time
+                    .unwrap()

Review comment:
       I can make it `DateTime<Utc>` instead of `Option<DateTime<Utc>>`




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to