superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maximebeauche...@apache.org
Subject [incubator-superset] branch master updated: Escape columns names for time grains - postgres (#3736)
Date Tue, 31 Oct 2017 04:02:48 GMT
This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 814b70f  Escape columns names for time grains - postgres (#3736)
814b70f is described below

commit 814b70ffd87750c8416d0f541504d8a854e82ec1
Author: Ryan Harmuth <ryanharmuth@gmail.com>
AuthorDate: Tue Oct 31 11:02:46 2017 +0700

    Escape columns names for time grains - postgres (#3736)
---
 superset/db_engine_specs.py | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/superset/db_engine_specs.py b/superset/db_engine_specs.py
index c9ed303..c5363af 100644
--- a/superset/db_engine_specs.py
+++ b/superset/db_engine_specs.py
@@ -214,14 +214,14 @@ class PostgresEngineSpec(BaseEngineSpec):
 
     time_grains = (
         Grain("Time Column", _('Time Column'), "{col}"),
-        Grain("second", _('second'), "DATE_TRUNC('second', {col})"),
-        Grain("minute", _('minute'), "DATE_TRUNC('minute', {col})"),
-        Grain("hour", _('hour'), "DATE_TRUNC('hour', {col})"),
-        Grain("day", _('day'), "DATE_TRUNC('day', {col})"),
-        Grain("week", _('week'), "DATE_TRUNC('week', {col})"),
-        Grain("month", _('month'), "DATE_TRUNC('month', {col})"),
-        Grain("quarter", _('quarter'), "DATE_TRUNC('quarter', {col})"),
-        Grain("year", _('year'), "DATE_TRUNC('year', {col})"),
+        Grain("second", _('second'), "DATE_TRUNC('second', \"{col}\")"),
+        Grain("minute", _('minute'), "DATE_TRUNC('minute', \"{col}\")"),
+        Grain("hour", _('hour'), "DATE_TRUNC('hour', \"{col}\")"),
+        Grain("day", _('day'), "DATE_TRUNC('day', \"{col}\")"),
+        Grain("week", _('week'), "DATE_TRUNC('week', \"{col}\")"),
+        Grain("month", _('month'), "DATE_TRUNC('month', \"{col}\")"),
+        Grain("quarter", _('quarter'), "DATE_TRUNC('quarter', \"{col}\")"),
+        Grain("year", _('year'), "DATE_TRUNC('year', \"{col}\")"),
     )
 
     @classmethod

-- 
To stop receiving notification emails like this one, please contact
['"commits@superset.apache.org" <commits@superset.apache.org>'].

Mime
View raw message