villebro commented on a change in pull request #10084:
URL: 
https://github.com/apache/incubator-superset/pull/10084#discussion_r449394054



##########
File path: tests/db_engine_specs/hive_tests.py
##########
@@ -153,6 +157,20 @@ def test_hive_get_view_names_return_empty_list(
             [], HiveEngineSpec.get_view_names(mock.ANY, mock.ANY, mock.ANY)
         )
 
+    def test_time_exp_mixd_case_col_1y(self):
+        # pylint: disable=line-too-long
+        # pylint: disable=invalid-name
+        """
+        DB Eng Specs (hive): Test grain expr mixed case 1 YEAR
+        """
+        col = column("MixedCase")
+        expr = HiveEngineSpec.get_timestamp_expr(col, None, "P1Y")
+        result = str(expr.compile(None, dialect=hive.dialect()))

Review comment:
       I'm not sure how we've usually handled Sql Alchemy plugin dialects in 
tests, but I think this needs to check if `hive` is available, and only run the 
test if that is the case.

##########
File path: tests/db_engine_specs/hive_tests.py
##########
@@ -16,6 +16,10 @@
 # under the License.
 from unittest import mock
 
+from pyhive import hive
+from sqlalchemy import column
+from sqlalchemy.dialects import *

Review comment:
       Is this import really needed? It seems none of the standard Sql Alchemy 
dialects are used here.




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

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