Fix week and month Time grain in MySQL (#297)
Fix week and month Time grain in MySQL (#297)

With mysql datetime and timestamp columns, currently the Time grain "week" and "month" options don't remove the time part. This results in groupings like this:

timestamp count
2015-04-05 07:00:00 1
2015-04-05 10:00:00 1
2015-04-05 11:00:00 2
2015-04-05 11:50:00 1
2015-04-05 12:00:00 5
2015-04-05 14:20:00 1
2015-04-05 14:30:00 1

and so on.

This is solved by wrapping the DATE_SUB with DATE().
FrederichCheng/incubator-superset,zhouyao1994/incubator-superset,airbnb/superset,FrederichCheng/incubator-superset,georgeke/caravel,asdf2014/superset,jeromecn/caravel_viz_full,SingTel-DataCo/incubator-superset,robert-digit/superset,apache/incubator-superset,airbnb/caravel,airbnb/superset,giaosudau/caravel,apache/incubator-superset,mistercrunch/panoramix,tienhv/caravel,jeromecn/caravel_viz_full,alanmcruickshank/superset-dev,mistercrunch/panoramix,ArijanaBrlek/superset,zhouyao1994/incubator-superset,wbsljh/caravel-aidp,ArijanaBrlek/superset,nekia/incubator-superset-dev,massgov/incubator-superset,georgeke/caravel,airbnb/caravel,wbsljh/caravel-aidp,georgeke/caravel,mistercrunch/panoramix,apache/incubator-superset,timifasubaa/incubator-superset,timifasubaa/incubator-superset,asdf2014/superset,airbnb/caravel,asdf2014/superset,jeromecn/caravel_viz_full,zhouyao1994/incubator-superset,tienhv/caravel,BRD-CD/superset,airbnb/superset,timifasubaa/incubator-superset,tienhv/caravel,dmigo/incubator-superset,apache/incubator-superset,BRD-CD/superset,zhouyao1994/incubator-superset,wbsljh/caravel,giaosudau/caravel,dmigo/incubator-superset,massgov/incubator-superset,FrederichCheng/incubator-superset,woel0007/caravel,wbsljh/caravel,nekia/incubator-superset-dev,nekia/incubator-superset-dev,robert-digit/superset,wbsljh/caravel,SingTel-DataCo/incubator-superset,SingTel-DataCo/incubator-superset,FrederichCheng/incubator-superset,francisliyy/caravel-aidp,georgeke/caravel,ArijanaBrlek/superset,dmigo/incubator-superset,ArijanaBrlek/superset,BRD-CD/superset,apache/incubator-superset,airbnb/caravel,robert-digit/superset,francisliyy/caravel-aidp,wbsljh/caravel-aidp,zhouyao1994/incubator-superset,alanmcruickshank/superset-dev,woel0007/caravel,timifasubaa/incubator-superset,giaosudau/caravel,massgov/incubator-superset,francisliyy/caravel-aidp,massgov/incubator-superset,alanmcruickshank/superset-dev,asdf2014/superset,alanmcruickshank/superset-dev,airbnb/superset,wbsljh/caravel-aidp,woel0007/caravel,francisliyy/caravel-aidp,jeromecn/caravel_viz_full,giaosudau/caravel,tienhv/caravel,BRD-CD/superset,nekia/incubator-superset-dev,dmigo/incubator-superset,SingTel-DataCo/incubator-superset,woel0007/caravel,wbsljh/caravel,robert-digit/superset,mistercrunch/panoramix