Skip to content

Commit

Permalink
addres comments
Browse files Browse the repository at this point in the history
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
  • Loading branch information
jayzhan211 committed May 5, 2024
1 parent aa9e800 commit 3e5cb0a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
9 changes: 4 additions & 5 deletions datafusion/functions-aggregate/src/covariance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

//! Defines the covariance aggregations.
//! [`CovarianceSample`]: covariance sample aggregations.

use std::fmt::Debug;

Expand Down Expand Up @@ -53,7 +53,6 @@ impl Debug for CovarianceSample {
f.debug_struct("CovarianceSample")
.field("name", &self.name())
.field("signature", &self.signature)
.field("accumulator", &"<FUNC>")
.finish()
}
}
Expand All @@ -67,7 +66,7 @@ impl Default for CovarianceSample {
impl CovarianceSample {
pub fn new() -> Self {
Self {
aliases: vec![String::from("covar_samp")],
aliases: vec![String::from("covar")],
signature: Signature::uniform(2, NUMERICS.to_vec(), Volatility::Immutable),
}
}
Expand All @@ -79,7 +78,7 @@ impl AggregateUDFImpl for CovarianceSample {
}

fn name(&self) -> &str {
"covar"
"covar_samp"
}

fn signature(&self) -> &Signature {
Expand Down Expand Up @@ -122,7 +121,7 @@ impl AggregateUDFImpl for CovarianceSample {
}

/// An accumulator to compute covariance
/// The algrithm used is an online implementation and numerically stable. It is derived from the following paper
/// The algorithm used is an online implementation and numerically stable. It is derived from the following paper
/// for calculating variance:
/// Welford, B. P. (1962). "Note on a method for calculating corrected sums of squares and products".
/// Technometrics. 4 (3): 419–420. doi:10.2307/1266577. JSTOR 1266577.
Expand Down
1 change: 1 addition & 0 deletions datafusion/physical-expr-common/src/aggregate/stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
// specific language governing permissions and limitations
// under the License.

/// TODO: Move this to functions-aggregate module
/// Enum used for differentiating population and sample for statistical functions
#[derive(Debug, Clone, Copy)]
pub enum StatsType {
Expand Down

0 comments on commit 3e5cb0a

Please sign in to comment.