Use proper mode
This commit is contained in:
parent
262f957218
commit
d3e807583a
@ -89,7 +89,7 @@ const SUPPORTED_AGGREGATE_FUNCTIONS = {
|
||||
sql: (column_name, params) => `max(${params.aggregated_column || column_name})`
|
||||
},
|
||||
'mode': {
|
||||
sql: (column_name, params) => `_cdb_mode(${params.aggregated_column || column_name})`
|
||||
sql: (column_name, params) => `mode() WITHIN GROUP (ORDER BY ${params.aggregated_column || column_name})`
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -2354,7 +2354,7 @@ describe('aggregation', function () {
|
||||
threshold: 1,
|
||||
columns: {
|
||||
value: {
|
||||
aggregate_function: 'sum',
|
||||
aggregate_function: 'mode',
|
||||
aggregated_column: 'value'
|
||||
}
|
||||
},
|
||||
@ -2400,7 +2400,7 @@ describe('aggregation', function () {
|
||||
threshold: 1,
|
||||
columns: {
|
||||
value: {
|
||||
aggregate_function: 'sum',
|
||||
aggregate_function: 'mode',
|
||||
aggregated_column: 'value'
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user