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


##########
datafusion/core/src/physical_optimizer/aggregate_statistics.rs:
##########
@@ -525,7 +525,7 @@ mod tests {
             expressions::binary(
                 expressions::col("a", &schema)?,
                 Operator::Gt,
-                expressions::lit(ScalarValue::from(1u32)),
+                expressions::lit(1u32),

Review Comment:
   This change shows the point of this PR pretty well 



##########
datafusion/physical-expr/src/expressions/literal.rs:
##########
@@ -74,8 +74,13 @@ impl PhysicalExpr for Literal {
 }
 
 /// Create a literal expression
-pub fn lit(value: ScalarValue) -> Arc<dyn PhysicalExpr> {
-    Arc::new(Literal::new(value))
+pub fn lit<T: datafusion_expr::Literal>(value: T) -> Arc<dyn PhysicalExpr> {

Review Comment:
   Here is the actual change. It isn't the most beautiful code but I think it 
is reasonable



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