mirror of
https://github.com/apache/superset.git
synced 2024-09-06 13:57:40 -04:00
fix: time grain key from P0.25Y to P3M (#21919)
This commit is contained in:
parent
76c865fc56
commit
c6c9215a2b
@ -47,7 +47,7 @@ class DuckDBEngineSpec(BaseEngineSpec):
|
||||
"P1D": "DATE_TRUNC('day', {col})",
|
||||
"P1W": "DATE_TRUNC('week', {col})",
|
||||
"P1M": "DATE_TRUNC('month', {col})",
|
||||
"P0.25Y": "DATE_TRUNC('quarter', {col})",
|
||||
"P3M": "DATE_TRUNC('quarter', {col})",
|
||||
"P1Y": "DATE_TRUNC('year', {col})",
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ class KustoSqlEngineSpec(BaseEngineSpec): # pylint: disable=abstract-method
|
||||
"P1D": "DATEADD(day, DATEDIFF(day, 0, {col}), 0)",
|
||||
"P1W": "DATEADD(day, -1, DATEADD(week, DATEDIFF(week, 0, {col}), 0))",
|
||||
"P1M": "DATEADD(month, DATEDIFF(month, 0, {col}), 0)",
|
||||
"P0.25Y": "DATEADD(quarter, DATEDIFF(quarter, 0, {col}), 0)",
|
||||
"P3M": "DATEADD(quarter, DATEDIFF(quarter, 0, {col}), 0)",
|
||||
"P1Y": "DATEADD(year, DATEDIFF(year, 0, {col}), 0)",
|
||||
"1969-12-28T00:00:00Z/P1W": "DATEADD(day, -1,"
|
||||
" DATEADD(week, DATEDIFF(week, 0, {col}), 0))",
|
||||
|
@ -36,7 +36,7 @@ class TeradataEngineSpec(BaseEngineSpec):
|
||||
"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')",
|
||||
"P3M": "TRUNC(CAST({col} as DATE), 'Q')",
|
||||
"P1Y": "TRUNC(CAST({col} as DATE), 'YEAR')",
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user