rdblue commented on a change in pull request #3126:
URL: https://github.com/apache/iceberg/pull/3126#discussion_r711799901
##########
File path:
spark3/src/test/java/org/apache/iceberg/actions/TestRemoveOrphanFilesAction3.java
##########
@@ -134,6 +135,24 @@ public void testSparkSessionCatalogHadoopTable() throws
Exception {
results.contains("file:" + location + "/data/trashfile"));
}
+ @Test
+ public void testSparkSessionCatalogHiveWrongConfig() {
+ spark.conf().set("spark.sql.catalog.spark_catalog",
"org.apache.iceberg.spark.SparkSessionCatalog");
+ spark.conf().set("spark.sql.catalog.spark_catalog.type", "hive");
+ spark.conf().set("spark.sql.catalog.spark_catalog.uri",
"thrift://localhost:9083");
+ if (spark.version().equalsIgnoreCase("3.0.3")) {
+ AssertHelpers.assertThrows("Expects config error",
+ ClassCastException.class,
+ () -> (SparkSessionCatalog)
spark.sessionState().catalogManager().v2SessionCatalog()
+ );
+ } else {
+ AssertHelpers.assertThrows("Expects config error",
Review comment:
This should use the version that tests the error message.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]