villebro commented on a change in pull request #17050:
URL: https://github.com/apache/superset/pull/17050#discussion_r726804779



##########
File path: superset/db_engine_specs/druid.py
##########
@@ -41,26 +41,26 @@ class DruidEngineSpec(BaseEngineSpec):
 
     _time_grain_expressions = {
         None: "{col}",
-        "PT1S": "FLOOR({col} TO SECOND)",
+        "PT1S": "TIME_FLOOR({col}, 'PT1S')",
         "PT5S": "TIME_FLOOR({col}, 'PT5S')",
         "PT30S": "TIME_FLOOR({col}, 'PT30S')",
-        "PT1M": "FLOOR({col} TO MINUTE)",
+        "PT1M": "TIME_FLOOR({col}, 'PT1M')",
         "PT5M": "TIME_FLOOR({col}, 'PT5M')",
         "PT10M": "TIME_FLOOR({col}, 'PT10M')",
         "PT15M": "TIME_FLOOR({col}, 'PT15M')",
         "PT0.5H": "TIME_FLOOR({col}, 'PT30M')",

Review comment:
       I've wondered about this before, as well as why `P0.25Y` is used in 
Superset instead of `P3M`. I tried looking at ISO-8601 to see if there's any 
guidance there, but I can't find anything. So I think they might be used 
interchangeably. However, since the decimal character varies from country to 
country, I think we'd be better off replacing `PT0.5H` and `P0.25Y` with 
`PT30M` and `P3M` respectively.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to