impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "anujphadke (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-4738: STDDEV SAMP should return NULL for single record input
Date Thu, 26 Jan 2017 18:59:17 GMT
anujphadke has posted comments on this change.

Change subject: IMPALA-4738: STDDEV_SAMP should return NULL for single record input
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/5800/1/be/src/exprs/aggregate-functions-ir.cc
File be/src/exprs/aggregate-functions-ir.cc:

PS1, Line 1348: DoubleVal AggregateFunctions::KnuthStddevFinalize(FunctionContext* ctx,
              :     const StringVal& state_sv) {
              :   DCHECK(!state_sv.is_null);
              :   DCHECK_EQ(state_sv.len, sizeof(KnuthVarianceState));
              :   KnuthVarianceState* state = reinterpret_cast<KnuthVarianceState*>(state_sv.ptr);
              :   if (state->count == 0 || state->count == 1) return DoubleVal::null();
              :   re
> this gets used by both stddev and stddev_samp, but it looks like Oracle (no
STDDEV is an alias for STDDEV_SAMP according the impala documentation. Shouldn't they behave
the same in this case?


-- 
To view, visit http://gerrit.cloudera.org:8080/5800
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ide8af752cd8a2e554a2cd5a1ec948967a80de1fe
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: anujphadke <aphadke@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <mj@cloudera.com>
Gerrit-Reviewer: anujphadke <aphadke@cloudera.com>
Gerrit-HasComments: Yes

Mime
View raw message