Skip to content

Commit

Permalink
support distinct aggregation in calculate expression
Browse files Browse the repository at this point in the history
  • Loading branch information
yzhang921 committed May 31, 2017
1 parent 5e8ef76 commit c8ffc45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/webapp/org/cboard/service/data/dataService.js
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ cBoard.service('dataService', function ($http, $q, updateService) {
});

var names = []; // expression text in aggreagtion function, could be a columnName or script
_.each(evalExp.match(/(sum|avg|count|max|min)\("?.*?"?\)/g), function (aggUnit) {
_.each(evalExp.match(/(sum|avg|count|max|min|distinct)\("?.*?"?\)/g), function (aggUnit) {
var aggregate = aggUnit.substring(0, aggUnit.indexOf('('));
var name = aggUnit.substring(aggUnit.indexOf('(') + 1, aggUnit.indexOf(')'));
if (name.match("_#")) {
Expand Down

0 comments on commit c8ffc45

Please sign in to comment.