villebro commented on a change in pull request #10266:
URL:
https://github.com/apache/incubator-superset/pull/10266#discussion_r454127247
##########
File path: tests/utils_tests.py
##########
@@ -1344,3 +1345,18 @@ def test_log_this(self) -> None:
json.loads(record.json)["form_data"]["viz_type"],
slc.viz.form_data["viz_type"],
)
+
+
+def test_parse_table_full_name():
+ assert parse_table_full_name("table") == (None, "table")
+ assert parse_table_full_name("table", schema="schema") == ("schema",
"table")
+ assert parse_table_full_name("table_schema.table", schema="schema") == (
+ "table_schema",
+ "table",
+ )
+ assert parse_table_full_name("table_schema.table") == ("table_schema",
"table")
+ assert parse_table_full_name("hive.table_schema.table") ==
("table_schema", "table")
+ assert parse_table_full_name("nonsense.hive.table_schema.table") == (
+ None,
+ "nonsense.hive.table_schema.table",
+ )
Review comment:
Ok, got it! 👍
----------------------------------------------------------------
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]