You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/07/16 05:04:28 UTC
[GitHub] [iceberg] hankfanchiu commented on issue #2751: "ICEBERG" vs. "iceberg" for "table_type" parameter
hankfanchiu commented on issue #2751:
URL: https://github.com/apache/iceberg/issues/2751#issuecomment-881179252
> The Iceberg code currently uses this method to check if the table is an iceberg table or not:
> https://github.com/apache/iceberg/blob/d5443e3a34a4288441a015ab616d965557d78202/hive-metastore/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java#L506-L510
>
> This should not be case sensitive.
Wondering whether my suggested change in #2722 is viable, comparing with the uppercase `"ICEBERG"` string value:
https://github.com/apache/iceberg/blob/a7e219453e5e56da7f3505b7163c44e92e35b9e6/hive-metastore/src/main/java/org/apache/iceberg/hive/HiveCatalog.java#L120-L123
Supporting lowercase certainly wouldn't be difficult, something like:
```java
String filterKey = hive_metastoreConstants.HIVE_FILTER_FIELD_PARAMS + BaseMetastoreTableOperations.TABLE_TYPE_PROP;
String filter = String.format("%s = \"%s\" OR %s = \"%s\"",
filterKey,
BaseMetastoreTableOperations.ICEBERG_TABLE_TYPE_VALUE.toUpperCase(Locale.ENGLISH),
filterKey,
BaseMetastoreTableOperations.ICEBERG_TABLE_TYPE_VALUE);
```
But what if some new system sets a Hive table type value of `"Iceberg"`?
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org