User Tools

ColumnStore Aggregate Distributed Functions

MariaDB ColumnStore comes with some aggregate distributed functions, that are also window functions. When the ColumnStore plugin is installed, these functions are available and they work well with all storage engines.

See MDEV-33687 - Make extra aggregate functions available when ColumnStore is not installed.

MariaDB aggregate functions are available for ColumnStore, as well.

Aggregate Distributed Functions List

This list might be incomplete.

CORR(y, x)

The correlation coefficient for non-null pairs in a group.

COVAR_POP(y, x)

The population covariance for non-null pairs in a group.

COVAR_SAMP(y, x)

The sample covariance for non-null pairs in a group.

REGR_AVGX(y, x)

Average of the independent variable SUM(X) / N, where N is number of rows processed by the function.

REGR_AVGY(y, x)

Average of the dependent variable SUM(Y) / N, where N is number of rows processed by the function.

REGR_COUNT(y, x)

The total number of input rows in which both column Y and column X are not null.

REGR_INTERCEPT(y, x)

The y-intercept of the least-squares-fit linear equation determined by the (X, Y) pairs.

REGR_R2(y, x)

Square of the correlation coefficient. cCrrelation coefficient is the REGR_INTERCEPT(y, x) for linear model.

REGR_SLOPE(y, x)

The slope of the least-squares-fit linear equation determined by the (x, y) pairs.

REGR_SXX(y, x)

An equivalent for REGR_COUNT(y, x) * VAR_POP(x) for non-null pairs.

REGR_SXY(y, x)

An equivalent for REGR_COUNT(y, x) * COVAR_POP(y, x) for non-null pairs.

REGR_SYY(y, x)

An equivalent for REGR_COUNT(y, x) * VAR_POP(y) for non-null pairs.


Original document

You could leave a comment if you were logged in.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also, you acknowledge that you have read and understand our Privacy Policy. If you do not agree, please leave the website.

More information