@@ -1046,7 +1046,7 @@ impl EquivalenceProperties {
1046
1046
if self . is_expr_constant ( source)
1047
1047
&& !const_exprs_contains ( & projected_constants, target)
1048
1048
{
1049
- if self . is_expr_constant_accross_partitions ( source) {
1049
+ if self . is_expr_constant_across_partitions ( source) {
1050
1050
projected_constants. push (
1051
1051
ConstExpr :: from ( target)
1052
1052
. with_across_partitions ( self . get_expr_constant_value ( source) ) ,
@@ -1221,10 +1221,33 @@ impl EquivalenceProperties {
1221
1221
/// # Returns
1222
1222
///
1223
1223
/// Returns `true` if the expression is constant across all partitions according
1224
- /// to equivalence group, `false` otherwise.
1224
+ /// to equivalence group, `false` otherwise
1225
+ #[ deprecated(
1226
+ since = "45.0.0" ,
1227
+ note = "Use [`is_expr_constant_across_partitions`] instead"
1228
+ ) ]
1225
1229
pub fn is_expr_constant_accross_partitions (
1226
1230
& self ,
1227
1231
expr : & Arc < dyn PhysicalExpr > ,
1232
+ ) -> bool {
1233
+ self . is_expr_constant_across_partitions ( expr)
1234
+ }
1235
+
1236
+ /// This function determines whether the provided expression is constant
1237
+ /// across partitions based on the known constants.
1238
+ ///
1239
+ /// # Parameters
1240
+ ///
1241
+ /// - `expr`: A reference to a `Arc<dyn PhysicalExpr>` representing the
1242
+ /// expression to be checked.
1243
+ ///
1244
+ /// # Returns
1245
+ ///
1246
+ /// Returns `true` if the expression is constant across all partitions according
1247
+ /// to equivalence group, `false` otherwise.
1248
+ pub fn is_expr_constant_across_partitions (
1249
+ & self ,
1250
+ expr : & Arc < dyn PhysicalExpr > ,
1228
1251
) -> bool {
1229
1252
// As an example, assume that we know columns `a` and `b` are constant.
1230
1253
// Then, `a`, `b` and `a + b` will all return `true` whereas `c` will
0 commit comments