chenjunjiedada commented on a change in pull request #461: Add a unit test for
testing import as hive table for importSparkTable
URL: https://github.com/apache/incubator-iceberg/pull/461#discussion_r322151562
##########
File path:
spark/src/test/java/org/apache/iceberg/spark/source/TestSparkTableUtil.java
##########
@@ -162,4 +163,33 @@ public void testImportUnpartitionedTable() throws
Exception {
long count =
spark.read().format("iceberg").load(location.toString()).count();
Assert.assertEquals("three values ", 3, count);
}
+
+ @Test
+ public void testImportAsHiveTable() throws Exception {
+ spark.table(qualifiedTableName).write().mode("overwrite").format("parquet")
+ .saveAsTable("unpartitioned_table");
+ TableIdentifier source = spark.sessionState().sqlParser()
+ .parseTableIdentifier("unpartitioned_table");
+
+ HiveCatalog catalog = new
HiveCatalog(spark.sparkContext().hadoopConfiguration());
Review comment:
I 'd like to change to use the static catalog from `HiveMetastoreTest` to
avoid forgetting closing resource.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]