Fix double escaping of dttm expressions (#744) (#1103)
Fix double escaping of dttm expressions (#744) (#1103)

If ddtm_expr is an expression with special characters then timestamp_grain escapes
the special characters already escaped.

Solution discussed with sqlalchemy upstream:
https://bitbucket.org/zzzeek/sqlalchemy/issues/3737/literal_column-given-a-specific-sql

Fix #617
BRD-CD/superset,dmigo/incubator-superset,ArijanaBrlek/superset,francisliyy/caravel-aidp,nekia/incubator-superset-dev,airbnb/superset,dmigo/incubator-superset,asdf2014/superset,nekia/incubator-superset-dev,dmigo/incubator-superset,massgov/incubator-superset,airbnb/caravel,BRD-CD/superset,BRD-CD/superset,robert-digit/superset,alanmcruickshank/superset-dev,FrederichCheng/incubator-superset,ArijanaBrlek/superset,wbsljh/caravel-aidp,robert-digit/superset,jeromecn/caravel_viz_full,zhouyao1994/incubator-superset,asdf2014/superset,alanmcruickshank/superset-dev,massgov/incubator-superset,FrederichCheng/incubator-superset,ArijanaBrlek/superset,francisliyy/caravel-aidp,airbnb/caravel,jeromecn/caravel_viz_full,robert-digit/superset,asdf2014/superset,francisliyy/caravel-aidp,zhouyao1994/incubator-superset,FrederichCheng/incubator-superset,airbnb/caravel,alanmcruickshank/superset-dev,jeromecn/caravel_viz_full,robert-digit/superset,zhouyao1994/incubator-superset,mistercrunch/panoramix,SingTel-DataCo/incubator-superset,timifasubaa/incubator-superset,wbsljh/caravel-aidp,mistercrunch/panoramix,wbsljh/caravel,apache/incubator-superset,wbsljh/caravel-aidp,alanmcruickshank/superset-dev,apache/incubator-superset,wbsljh/caravel,SingTel-DataCo/incubator-superset,jeromecn/caravel_viz_full,wbsljh/caravel-aidp,apache/incubator-superset,BRD-CD/superset,airbnb/superset,asdf2014/superset,ArijanaBrlek/superset,massgov/incubator-superset,timifasubaa/incubator-superset,dmigo/incubator-superset,apache/incubator-superset,airbnb/superset,wbsljh/caravel,nekia/incubator-superset-dev,SingTel-DataCo/incubator-superset,zhouyao1994/incubator-superset,airbnb/superset,airbnb/caravel,nekia/incubator-superset-dev,timifasubaa/incubator-superset,mistercrunch/panoramix,SingTel-DataCo/incubator-superset,apache/incubator-superset,francisliyy/caravel-aidp,massgov/incubator-superset,mistercrunch/panoramix,FrederichCheng/incubator-superset,wbsljh/caravel,zhouyao1994/incubator-superset,timifasubaa/incubator-superset