@finos/legend-data-cube
Version:
49 lines • 2.06 kB
JavaScript
/**
* Copyright (c) 2020-present, Goldman Sachs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { DataCubeQueryAggregateOperation } from './DataCubeQueryAggregateOperation.js';
import { DataCubeQueryAggregateOperator, DataCubeColumnDataType, DataCubeFunction, ofDataType, } from '../DataCubeQueryEngine.js';
import { _aggCol_base } from '../DataCubeQueryBuilderUtils.js';
import { _agg_base } from '../DataCubeSnapshotBuilderUtils.js';
export class DataCubeQueryAggregateOperation__StdDevPopulation extends DataCubeQueryAggregateOperation {
get label() {
return 'std';
}
get textLabel() {
return 'standard deviation (population)';
}
get description() {
return 'standard deviation (population)';
}
get operator() {
return DataCubeQueryAggregateOperator.STANDARD_DEVIATION_POPULATION;
}
isCompatibleWithColumn(column) {
return ofDataType(column.type, [DataCubeColumnDataType.NUMBER]);
}
isCompatibleWithParameterValues(values) {
return !values.length;
}
generateDefaultParameterValues(column) {
return [];
}
buildAggregateColumnSnapshot(colSpec, columnGetter) {
return this._finalizeAggregateColumnSnapshot(_agg_base(colSpec, DataCubeFunction.STANDARD_DEVIATION_POPULATION, columnGetter));
}
buildAggregateColumnExpression(column) {
return _aggCol_base(column, DataCubeFunction.STANDARD_DEVIATION_POPULATION);
}
}
//# sourceMappingURL=DataCubeQueryAggregateOperation__StdDevPopulation.js.map