Gergely Fürnstáhl has posted comments on this change. ( http://gerrit.cloudera.org:8080/18413 )
Change subject: IMPALA-11205: Implement Statistical functions : CORR(), COVAR_SAMP() and COVAR_POP() ...................................................................... Patch Set 25: (1 comment) http://gerrit.cloudera.org:8080/#/c/18413/25/be/src/exprs/aggregate-functions-ir.cc File be/src/exprs/aggregate-functions-ir.cc: http://gerrit.cloudera.org:8080/#/c/18413/25/be/src/exprs/aggregate-functions-ir.cc@300 PS25, Line 300: struct CorrState { : int64_t count; // number of elements : double xavg; // average of x elements : double yavg; // average of y elements : double xvar; // n times the variance of x elements : double yvar; // n times the variance of y elements : double covar; // n times the covariance : }; > In Patchset12, you used CorrState for Covar calculations as well, which I a As we discussed in the call, removing the code duplication brings up more unnecessary complications in the code and its cleaner to keep them separate, as it is. Maybe you can add a cross reference in the comment to the structs, e.g. "If you change Corr functions you probably have to change Covar functions too and vice versa. -- To view, visit http://gerrit.cloudera.org:8080/18413 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I32ad627c953ba24d9cde2d5549bdd0d27a9c0d06 Gerrit-Change-Number: 18413 Gerrit-PatchSet: 25 Gerrit-Owner: Anonymous Coward <[email protected]> Gerrit-Reviewer: Anonymous Coward <[email protected]> Gerrit-Reviewer: Gergely Fürnstáhl <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Jian Zhang <[email protected]> Gerrit-Reviewer: Kurt Deschler <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]> Gerrit-Comment-Date: Fri, 17 Jun 2022 07:17:24 +0000 Gerrit-HasComments: Yes
