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



##########
File path: tests/db_engine_specs/bigquery_tests.py
##########
@@ -33,18 +41,26 @@ def test_bigquery_sqla_column_label(self):
             self.assertEqual(actual, expected)
 
     def test_convert_dttm(self):
+        """
+        DB Eng Specs (bigquery): Test conversion to date time
+        """
         dttm = self.get_dttm()
         test_cases = {
             "DATE": "CAST('2019-01-02' AS DATE)",
             "DATETIME": "CAST('2019-01-02T03:04:05.678900' AS DATETIME)",
             "TIMESTAMP": "CAST('2019-01-02T03:04:05.678900' AS TIMESTAMP)",
+            "TIME": "CAST('03:04:05.678900' AS TIME)",
+            "TIMEDATE": None,

Review comment:
       I was thrown off for a second, "what type is that?" 😆 Perhaps call it 
`UNKNOWNTYPE` to make it clear that it's not expected to be found.

##########
File path: tests/db_engine_specs/bigquery_tests.py
##########
@@ -57,3 +73,112 @@ def test_timegrain_expressions(self):
                 col=col, pdf=None, time_grain="PT1H", type_=type_
             )
             self.assertEqual(str(actual), expected)
+
+    def test_fetch_data(self):
+        """
+        DB Eng Specs (bigquery): Test fetch data
+        """
+        # Mock a google.cloud.bigquery.table.Row
+        class Row(object):
+            def __init__(self, value):
+                self._value = value
+
+            def values(self):
+                return self._value
+
+        data1 = [(1, "foo")]
+        with mock.patch.object(BaseEngineSpec, "fetch_data", 
return_value=data1):
+            result = BigQueryEngineSpec.fetch_data(None, 0)
+        self.assertEqual(result, data1)
+
+        row1 = Row(1)
+        row2 = Row(2)
+        data2 = [row1, row2]

Review comment:
       Perhaps just throw those on the same row: `data2 = [Row(1), Row(2)]`




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