fixing issue #6572 with Oracle date handling (#6580)

* fix Oracle engine specs for dates issue #6572

* fix Oracle engine specs for dates issue #6572

* fix Oracle engine specs for dates issue #6572, removing comment

* ng a trailing space
This commit is contained in:
ghsalem 2018-12-28 17:51:48 +01:00 committed by Maxime Beauchemin
parent 2c3794e28d
commit f761237260
1 changed files with 7 additions and 7 deletions

View File

@ -485,13 +485,13 @@ class OracleEngineSpec(PostgresBaseEngineSpec):
time_grain_functions = {
None: '{col}',
'PT1S': 'CAST({col} as DATE)',
'PT1M': "TRUNC(TO_DATE({col}), 'MI')",
'PT1H': "TRUNC(TO_DATE({col}), 'HH')",
'P1D': "TRUNC(TO_DATE({col}), 'DDD')",
'P1W': "TRUNC(TO_DATE({col}), 'WW')",
'P1M': "TRUNC(TO_DATE({col}), 'MONTH')",
'P0.25Y': "TRUNC(TO_DATE({col}), 'Q')",
'P1Y': "TRUNC(TO_DATE({col}), 'YEAR')",
'PT1M': "TRUNC(CAST({col} as DATE), 'MI')",
'PT1H': "TRUNC(CAST({col} as DATE), 'HH')",
'P1D': "TRUNC(CAST({col} as DATE), 'DDD')",
'P1W': "TRUNC(CAST({col} as DATE), 'WW')",
'P1M': "TRUNC(CAST({col} as DATE), 'MONTH')",
'P0.25Y': "TRUNC(CAST({col} as DATE), 'Q')",
'P1Y': "TRUNC(CAST({col} as DATE), 'YEAR')",
}
@classmethod