You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datafusion.apache.org by al...@apache.org on 2025/01/23 22:50:37 UTC
(datafusion) branch main updated: chore: deprecate function with typo in name (is_expr_constant_accross_partitions) (#14252)
This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new bd0b56f86f chore: deprecate function with typo in name (is_expr_constant_accross_partitions) (#14252)
bd0b56f86f is described below
commit bd0b56f86fb815acf07629ec535532ed3b5cb026
Author: Andy Grove <ag...@apache.org>
AuthorDate: Thu Jan 23 15:50:32 2025 -0700
chore: deprecate function with typo in name (is_expr_constant_accross_partitions) (#14252)
* deprecate function with typo in name (is_expr_constant_across_partitions)
* fmt
---
.../physical-expr/src/equivalence/properties.rs | 27 ++++++++++++++++++++--
1 file changed, 25 insertions(+), 2 deletions(-)
diff --git a/datafusion/physical-expr/src/equivalence/properties.rs b/datafusion/physical-expr/src/equivalence/properties.rs
index fed33315d7..a6417044a0 100755
--- a/datafusion/physical-expr/src/equivalence/properties.rs
+++ b/datafusion/physical-expr/src/equivalence/properties.rs
@@ -1046,7 +1046,7 @@ impl EquivalenceProperties {
if self.is_expr_constant(source)
&& !const_exprs_contains(&projected_constants, target)
{
- if self.is_expr_constant_accross_partitions(source) {
+ if self.is_expr_constant_across_partitions(source) {
projected_constants.push(
ConstExpr::from(target)
.with_across_partitions(self.get_expr_constant_value(source)),
@@ -1221,10 +1221,33 @@ impl EquivalenceProperties {
/// # Returns
///
/// Returns `true` if the expression is constant across all partitions according
- /// to equivalence group, `false` otherwise.
+ /// to equivalence group, `false` otherwise
+ #[deprecated(
+ since = "45.0.0",
+ note = "Use [`is_expr_constant_across_partitions`] instead"
+ )]
pub fn is_expr_constant_accross_partitions(
&self,
expr: &Arc<dyn PhysicalExpr>,
+ ) -> bool {
+ self.is_expr_constant_across_partitions(expr)
+ }
+
+ /// This function determines whether the provided expression is constant
+ /// across partitions based on the known constants.
+ ///
+ /// # Parameters
+ ///
+ /// - `expr`: A reference to a `Arc<dyn PhysicalExpr>` representing the
+ /// expression to be checked.
+ ///
+ /// # Returns
+ ///
+ /// Returns `true` if the expression is constant across all partitions according
+ /// to equivalence group, `false` otherwise.
+ pub fn is_expr_constant_across_partitions(
+ &self,
+ expr: &Arc<dyn PhysicalExpr>,
) -> bool {
// As an example, assume that we know columns `a` and `b` are constant.
// Then, `a`, `b` and `a + b` will all return `true` whereas `c` will
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org