You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by bl...@apache.org on 2019/08/23 18:28:00 UTC

[incubator-iceberg] branch master updated: Hive: Improve error message when table type is not iceberg (#403) (#405)

This is an automated email from the ASF dual-hosted git repository.

blue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-iceberg.git


The following commit(s) were added to refs/heads/master by this push:
     new ef546ef  Hive: Improve error message when table type is not iceberg (#403) (#405)
ef546ef is described below

commit ef546effa0834a9279cc9bbf9f86fa0166be71a5
Author: waterlx <wa...@gmail.com>
AuthorDate: Sat Aug 24 02:27:55 2019 +0800

    Hive: Improve error message when table type is not iceberg (#403) (#405)
---
 hive/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/hive/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java b/hive/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java
index 17d0283..2548827 100644
--- a/hive/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java
+++ b/hive/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java
@@ -92,7 +92,9 @@ public class HiveTableOperations extends BaseMetastoreTableOperations {
       String tableType = table.getParameters().get(TABLE_TYPE_PROP);
 
       if (tableType == null || !tableType.equalsIgnoreCase(ICEBERG_TABLE_TYPE_VALUE)) {
-        throw new IllegalArgumentException(String.format("Invalid tableName, not Iceberg: %s.%s", database, table));
+        throw new IllegalArgumentException(String.format("Type of %s.%s is %s, not %s",
+            database, tableName,
+            tableType /* actual type */, ICEBERG_TABLE_TYPE_VALUE /* expected type */));
       }
 
       metadataLocation = table.getParameters().get(METADATA_LOCATION_PROP);