Aggarwal-Raghav commented on code in PR #6021: URL: https://github.com/apache/hive/pull/6021#discussion_r2264830980
########## ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java: ########## @@ -1974,6 +1996,19 @@ public List<String> getTablesByType(String dbName, String pattern, TableType typ try { List<String> result; + if (ifIceberg) { + if (type != null) { + throw new HiveException("Iceberg Tables by default is External Table"); + } else { + if (pattern != null) { Review Comment: nit: This looks cleaner. ``` if (ifIceberg) { if (type != null) { throw new HiveException("Iceberg tables are always of type EXTERNAL_TABLE"); } String icebergPattern = (pattern != null) ? pattern : ".*"; List<TableName> icebergTables = getIcebergTables(getMSC(), null, dbName, icebergPattern).getTables(); return icebergTables.stream() .map(TableName::getTable) .collect(Collectors.toList()); } ``` -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org