betodealmeida commented on a change in pull request #18690:
URL: https://github.com/apache/superset/pull/18690#discussion_r808560870



##########
File path: superset/db_engine_specs/databricks.py
##########
@@ -37,7 +51,7 @@ class DatabricksODBCEngineSpec(BaseEngineSpec):
     # the syntax for the ODBC engine is identical to the Hive one, so
     # we can reuse the expressions from `HiveEngineSpec`
     # pylint: disable=protected-access
-    _time_grain_expressions = HiveEngineSpec._time_grain_expressions
+    _time_grain_expressions = DatabricksHiveEngineSpec._time_grain_expressions

Review comment:
       You can also define `time_grain_expressions` outside the classes, and 
then reuse it in both classes, I think it might be clearer:
   
   ```python
   time_grain_expression = { ... }
   
   class DatabricksHiveEngineSpec(HiveEngineSpec):
       _time_grain_expressions = time_grain_expressions
       ...
   
   class DatabricksODBCEngineSpec(BaseEngineSpec):
       _time_grain_expressions = time_grain_expressions
       ...
   ```




-- 
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