Better distinction between tables and views, and show CREATE VIEW (#8213)

* WIP

* Add missing file

* WIP

* Clean up

* Use label instead

* Address comments

* Add docstring

* Fix lint

* Fix typo

* Fix unit test
This commit is contained in:
Beto Dealmeida
2019-09-17 14:24:38 -07:00
committed by GitHub
parent 4132d8fb0f
commit 88777943fa
7 changed files with 170 additions and 21 deletions

View File

@@ -859,6 +859,7 @@ class DbEngineSpecsTestCase(SupersetTestCase):
db.get_extra = mock.Mock(return_value={})
df = pd.DataFrame({"ds": ["01-01-19"], "hour": [1]})
db.get_df = mock.Mock(return_value=df)
PrestoEngineSpec.get_create_view = mock.Mock(return_value=None)
result = PrestoEngineSpec.extra_table_metadata(db, "test_table", "test_schema")
self.assertEqual({"ds": "01-01-19", "hour": 1}, result["partitions"]["latest"])