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


##########
datafusion/core/src/physical_optimizer/aggregate_statistics.rs:
##########
@@ -148,10 +152,10 @@ fn take_optimizable_table_count(
                 .as_any()
                 .downcast_ref::<expressions::Literal>()
             {
-                if lit_expr.value() == &ScalarValue::UInt8(Some(1)) {
+                if lit_expr.value() == &COUNT_STAR_EXPANSION {
                     return Some((
-                        ScalarValue::UInt64(Some(num_rows as u64)),
-                        "COUNT(UInt8(1))",
+                        ScalarValue::Int64(Some(num_rows as i64)),

Review Comment:
   The change from `UInt64` to `Int64` here and a few lines below is the actual 
bug fix / change of behavior -- the rest of this PR is testing / readability 
improvements



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