@@ -12,18 +12,18 @@ def test_make_table_no_args():
1212 assert table_info == TableInfo (
1313 catalog_name = 'hive_metastore' ,
1414 schema_name = 'dummy_srandom' ,
15- name = 'ucx_trandom ' ,
15+ name = 'dummy_trandom ' ,
1616 table_type = TableType .MANAGED ,
1717 data_source_format = DataSourceFormat .DELTA ,
18- full_name = 'hive_metastore.dummy_srandom.ucx_trandom ' ,
19- storage_location = 'dbfs:/user/hive/warehouse/dummy_srandom/ucx_trandom ' ,
18+ full_name = 'hive_metastore.dummy_srandom.dummy_trandom ' ,
19+ storage_location = 'dbfs:/user/hive/warehouse/dummy_srandom/dummy_trandom ' ,
2020 properties = {'RemoveAfter' : '2024091313' },
2121 )
2222
2323 assert ctx ['sql_backend' ].queries == [
2424 'CREATE SCHEMA hive_metastore.dummy_srandom WITH DBPROPERTIES (RemoveAfter=2024091313)' ,
25- "CREATE TABLE hive_metastore.dummy_srandom.ucx_trandom (id INT, value STRING) TBLPROPERTIES ( 'RemoveAfter' = '2024091313' )" ,
26- 'DROP TABLE IF EXISTS hive_metastore.dummy_srandom.ucx_trandom ' ,
25+ "CREATE TABLE hive_metastore.dummy_srandom.dummy_trandom (id INT, value STRING) TBLPROPERTIES ( 'RemoveAfter' = '2024091313' )" ,
26+ 'DROP TABLE IF EXISTS hive_metastore.dummy_srandom.dummy_trandom ' ,
2727 'DROP SCHEMA IF EXISTS hive_metastore.dummy_srandom CASCADE' ,
2828 ]
2929
@@ -34,18 +34,18 @@ def test_make_view():
3434 assert table_info == TableInfo (
3535 catalog_name = 'hive_metastore' ,
3636 schema_name = 'dummy_srandom' ,
37- name = 'ucx_trandom ' ,
37+ name = 'dummy_trandom ' ,
3838 table_type = TableType .VIEW ,
39- full_name = 'hive_metastore.dummy_srandom.ucx_trandom ' ,
39+ full_name = 'hive_metastore.dummy_srandom.dummy_trandom ' ,
4040 properties = {'RemoveAfter' : '2024091313' },
4141 view_definition = 'SELECT 1' ,
4242 )
4343
4444 assert ctx ['sql_backend' ].queries == [
4545 'CREATE SCHEMA hive_metastore.dummy_srandom WITH DBPROPERTIES (RemoveAfter=2024091313)' ,
46- "CREATE VIEW hive_metastore.dummy_srandom.ucx_trandom AS SELECT 1" ,
47- "ALTER VIEW hive_metastore.dummy_srandom.ucx_trandom SET TBLPROPERTIES ( 'RemoveAfter' = '2024091313' )" ,
48- 'DROP TABLE IF EXISTS hive_metastore.dummy_srandom.ucx_trandom ' ,
46+ "CREATE VIEW hive_metastore.dummy_srandom.dummy_trandom AS SELECT 1" ,
47+ "ALTER VIEW hive_metastore.dummy_srandom.dummy_trandom SET TBLPROPERTIES ( 'RemoveAfter' = '2024091313' )" ,
48+ 'DROP TABLE IF EXISTS hive_metastore.dummy_srandom.dummy_trandom ' ,
4949 'DROP SCHEMA IF EXISTS hive_metastore.dummy_srandom CASCADE' ,
5050 ]
5151
@@ -56,27 +56,27 @@ def test_make_external_table():
5656 assert table_info == TableInfo (
5757 catalog_name = 'hive_metastore' ,
5858 schema_name = 'dummy_srandom' ,
59- name = 'ucx_trandom ' ,
59+ name = 'dummy_trandom ' ,
6060 table_type = TableType .EXTERNAL ,
6161 data_source_format = DataSourceFormat .JSON ,
62- full_name = 'hive_metastore.dummy_srandom.ucx_trandom ' ,
63- storage_location = 'dbfs:/tmp/ucx_test_RANDOM ' ,
62+ full_name = 'hive_metastore.dummy_srandom.dummy_trandom ' ,
63+ storage_location = 'dbfs:/tmp/dummy_trandom ' ,
6464 properties = {'RemoveAfter' : '2024091313' },
6565 )
6666
6767 ctx ['log_workspace_link' ].assert_called_with (
68- 'hive_metastore.dummy_srandom.ucx_trandom schema' ,
69- 'explore/data/hive_metastore/dummy_srandom/ucx_trandom ' ,
68+ 'hive_metastore.dummy_srandom.dummy_trandom schema' ,
69+ 'explore/data/hive_metastore/dummy_srandom/dummy_trandom ' ,
7070 )
7171
7272 assert ctx ['sql_backend' ].queries == [
7373 'CREATE SCHEMA hive_metastore.dummy_srandom WITH DBPROPERTIES (RemoveAfter=2024091313)' ,
74- 'CREATE TABLE hive_metastore.dummy_srandom.ucx_trandom USING json location '
75- "'dbfs:/tmp/ucx_test_RANDOM ' as SELECT CAST(calories_burnt AS INT) AS `id`, "
74+ 'CREATE TABLE hive_metastore.dummy_srandom.dummy_trandom USING json location '
75+ "'dbfs:/tmp/dummy_trandom ' as SELECT CAST(calories_burnt AS INT) AS `id`, "
7676 'CAST(device_id AS STRING) AS `value` FROM '
7777 'JSON.`dbfs:/databricks-datasets/iot-stream/data-device`' ,
78- "ALTER TABLE hive_metastore.dummy_srandom.ucx_trandom SET TBLPROPERTIES ( 'RemoveAfter' = '2024091313' )" ,
79- 'DROP TABLE IF EXISTS hive_metastore.dummy_srandom.ucx_trandom ' ,
78+ "ALTER TABLE hive_metastore.dummy_srandom.dummy_trandom SET TBLPROPERTIES ( 'RemoveAfter' = '2024091313' )" ,
79+ 'DROP TABLE IF EXISTS hive_metastore.dummy_srandom.dummy_trandom ' ,
8080 'DROP SCHEMA IF EXISTS hive_metastore.dummy_srandom CASCADE' ,
8181 ]
8282
@@ -87,18 +87,18 @@ def test_make_table_custom_schema():
8787 assert table_info == TableInfo (
8888 catalog_name = 'hive_metastore' ,
8989 schema_name = 'dummy_srandom' ,
90- name = 'ucx_trandom ' ,
90+ name = 'dummy_trandom ' ,
9191 table_type = TableType .MANAGED ,
9292 data_source_format = DataSourceFormat .DELTA ,
93- full_name = 'hive_metastore.dummy_srandom.ucx_trandom ' ,
94- storage_location = 'dbfs:/user/hive/warehouse/dummy_srandom/ucx_trandom ' ,
93+ full_name = 'hive_metastore.dummy_srandom.dummy_trandom ' ,
94+ storage_location = 'dbfs:/user/hive/warehouse/dummy_srandom/dummy_trandom ' ,
9595 properties = {'RemoveAfter' : '2024091313' },
9696 )
9797
9898 assert ctx ['sql_backend' ].queries == [
9999 'CREATE SCHEMA hive_metastore.dummy_srandom WITH DBPROPERTIES (RemoveAfter=2024091313)' ,
100- "CREATE TABLE hive_metastore.dummy_srandom.ucx_trandom (`a` INT, `b` STRING) TBLPROPERTIES ( 'RemoveAfter' = '2024091313' )" ,
101- 'DROP TABLE IF EXISTS hive_metastore.dummy_srandom.ucx_trandom ' ,
100+ "CREATE TABLE hive_metastore.dummy_srandom.dummy_trandom (`a` INT, `b` STRING) TBLPROPERTIES ( 'RemoveAfter' = '2024091313' )" ,
101+ 'DROP TABLE IF EXISTS hive_metastore.dummy_srandom.dummy_trandom ' ,
102102 'DROP SCHEMA IF EXISTS hive_metastore.dummy_srandom CASCADE' ,
103103 ]
104104
@@ -120,15 +120,15 @@ def test_make_udf():
120120 assert fn_info == FunctionInfo (
121121 catalog_name = 'hive_metastore' ,
122122 schema_name = 'dummy_srandom' ,
123- name = 'ucx_trandom ' ,
124- full_name = 'hive_metastore.dummy_srandom.ucx_trandom ' ,
123+ name = 'dummy_frandom ' ,
124+ full_name = 'hive_metastore.dummy_srandom.dummy_frandom ' ,
125125 )
126126
127127 assert ctx ['sql_backend' ].queries == [
128128 'CREATE SCHEMA hive_metastore.dummy_srandom WITH DBPROPERTIES (RemoveAfter=2024091313)' ,
129- 'CREATE FUNCTION hive_metastore.dummy_srandom.ucx_trandom (x INT) RETURNS '
129+ 'CREATE FUNCTION hive_metastore.dummy_srandom.dummy_frandom (x INT) RETURNS '
130130 'FLOAT CONTAINS SQL DETERMINISTIC RETURN 0;' ,
131- 'DROP FUNCTION IF EXISTS hive_metastore.dummy_srandom.ucx_trandom ' ,
131+ 'DROP FUNCTION IF EXISTS hive_metastore.dummy_srandom.dummy_frandom ' ,
132132 'DROP SCHEMA IF EXISTS hive_metastore.dummy_srandom CASCADE' ,
133133 ]
134134
0 commit comments