Skip to content

Commit

Permalink
Force float in MySQL to deal with AVG issue (growthbook#928)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukesonnet authored Jan 20, 2023
1 parent 58ade35 commit 433a563
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/back-end/src/integrations/Mysql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,7 @@ export default class Mysql extends SqlIntegration {
castToString(col: string): string {
return `cast(${col} as char)`;
}
ensureFloat(col: string): string {
return `CAST(${col} AS FLOAT)`;
}
}

0 comments on commit 433a563

Please sign in to comment.