@@ -2491,7 +2491,8 @@ impl AggregateExpr {
24912491 /// Returns whether the expression has a constant result.
24922492 pub fn is_constant ( & self ) -> bool {
24932493 match self . func {
2494- AggregateFunc :: MaxInt16
2494+ AggregateFunc :: MaxNumeric
2495+ | AggregateFunc :: MaxInt16
24952496 | AggregateFunc :: MaxInt32
24962497 | AggregateFunc :: MaxInt64
24972498 | AggregateFunc :: MaxUInt16
@@ -2505,6 +2506,9 @@ impl AggregateExpr {
25052506 | AggregateFunc :: MaxDate
25062507 | AggregateFunc :: MaxTimestamp
25072508 | AggregateFunc :: MaxTimestampTz
2509+ | AggregateFunc :: MaxInterval
2510+ | AggregateFunc :: MaxTime
2511+ | AggregateFunc :: MinNumeric
25082512 | AggregateFunc :: MinInt16
25092513 | AggregateFunc :: MinInt32
25102514 | AggregateFunc :: MinInt64
@@ -2519,11 +2523,36 @@ impl AggregateExpr {
25192523 | AggregateFunc :: MinDate
25202524 | AggregateFunc :: MinTimestamp
25212525 | AggregateFunc :: MinTimestampTz
2526+ | AggregateFunc :: MinInterval
2527+ | AggregateFunc :: MinTime
25222528 | AggregateFunc :: Any
25232529 | AggregateFunc :: All
25242530 | AggregateFunc :: Dummy => self . expr . is_literal ( ) ,
25252531 AggregateFunc :: Count => self . expr . is_literal_null ( ) ,
2526- _ => self . expr . is_literal_err ( ) ,
2532+ AggregateFunc :: SumInt16
2533+ | AggregateFunc :: SumInt32
2534+ | AggregateFunc :: SumInt64
2535+ | AggregateFunc :: SumUInt16
2536+ | AggregateFunc :: SumUInt32
2537+ | AggregateFunc :: SumUInt64
2538+ | AggregateFunc :: SumFloat32
2539+ | AggregateFunc :: SumFloat64
2540+ | AggregateFunc :: SumNumeric
2541+ | AggregateFunc :: JsonbAgg { .. }
2542+ | AggregateFunc :: JsonbObjectAgg { .. }
2543+ | AggregateFunc :: MapAgg { .. }
2544+ | AggregateFunc :: ArrayConcat { .. }
2545+ | AggregateFunc :: ListConcat { .. }
2546+ | AggregateFunc :: StringAgg { .. }
2547+ | AggregateFunc :: RowNumber { .. }
2548+ | AggregateFunc :: Rank { .. }
2549+ | AggregateFunc :: DenseRank { .. }
2550+ | AggregateFunc :: LagLead { .. }
2551+ | AggregateFunc :: FirstValue { .. }
2552+ | AggregateFunc :: LastValue { .. }
2553+ | AggregateFunc :: FusedValueWindowFunc { .. }
2554+ | AggregateFunc :: WindowAggregate { .. }
2555+ | AggregateFunc :: FusedWindowAggregate { .. } => self . expr . is_literal_err ( ) ,
25272556 }
25282557 }
25292558
0 commit comments