File tree Expand file tree Collapse file tree 1 file changed +5
-12
lines changed
sql/hive/src/test/scala/org/apache/spark/sql/hive Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -116,23 +116,16 @@ class HiveExternalCatalogSuite extends ExternalCatalogSuite {
116116
117117 test(" SPARK-29498 CatalogTable to HiveTable should not change the table's ownership" ) {
118118 val catalog = newBasicCatalog()
119- val identifier = TableIdentifier (" spark_29498" , Some (" default" ))
120119 val owner = " SPARK-29498"
121- val newTable = CatalogTable (
122- identifier,
120+ val hiveTable = CatalogTable (
121+ identifier = TableIdentifier ( " spark_29498 " , Some ( " db1 " )) ,
123122 tableType = CatalogTableType .MANAGED ,
124- storage = CatalogStorageFormat (
125- locationUri = None ,
126- inputFormat = None ,
127- outputFormat = None ,
128- serde = None ,
129- compressed = false ,
130- properties = Map .empty),
123+ storage = storageFormat,
131124 owner = owner,
132125 schema = new StructType ().add(" i" , " int" ),
133126 provider = Some (" hive" ))
134127
135- catalog.createTable(newTable, false )
136- assert(catalog.getTable(" default " , " spark_29498" ).owner === owner)
128+ catalog.createTable(hiveTable, ignoreIfExists = false )
129+ assert(catalog.getTable(" db1 " , " spark_29498" ).owner === owner)
137130 }
138131}
You can’t perform that action at this time.
0 commit comments