Skip to content

Commit

Permalink
[hotfix] casting dates for presto grain functions
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Mar 16, 2016
1 parent ae1e66f commit 73daf2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions panoramix/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,8 @@ def grains(self):
DB_TIME_GRAINS = {
'presto': (
Grain('Time Column', '{col}'),
Grain('week', "date_trunc('week', {col})"),
Grain('month', "date_trunc('month', {col})"),
Grain('week', "date_trunc('week', CAST({col} AS DATE))"),
Grain('month', "date_trunc('month', CAST({col} AS DATE))"),
),
'mysql': (
Grain('Time Column', '{col}'),
Expand Down

0 comments on commit 73daf2f

Please sign in to comment.