Small fix for Presto dtype map (#8251)

* Small fix for Presto dtype map

* Add unit test
This commit is contained in:
Beto Dealmeida
2019-09-18 12:46:50 -07:00
committed by GitHub
parent 8d04e1f55f
commit 4088a84eb4
2 changed files with 8 additions and 2 deletions

View File

@@ -129,3 +129,9 @@ class SupersetDataFrameTestCase(SupersetTestCase):
cdf.raw_df.values.tolist(),
[[np.nan], [1239162456494753670], [np.nan], [np.nan], [np.nan], [np.nan]],
)
def test_pandas_datetime64(self):
data = [(None,)]
cursor_descr = [("ds", "timestamp", None, None, None, None, True)]
cdf = SupersetDataFrame(data, cursor_descr, PrestoEngineSpec)
self.assertEqual(cdf.raw_df.dtypes[0], np.dtype("<M8[ns]"))