Skip to content

Commit d7e430c

Browse files
committed
Address review comment
1 parent 169dceb commit d7e430c

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergUtil.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,15 @@ private static SchemaTableName getBaseSchemaTableName(SchemaTableName table)
291291

292292
public static TableOperations opsFromTable(Table table)
293293
{
294-
return table instanceof BaseTransaction.TransactionTable ?
295-
((BaseTransaction.TransactionTable) table).operations() :
296-
((BaseTable) table).operations();
294+
if (table instanceof BaseTransaction.TransactionTable) {
295+
return ((BaseTransaction.TransactionTable) table).operations();
296+
}
297+
else if (table instanceof BaseTable) {
298+
return ((BaseTable) table).operations();
299+
}
300+
else {
301+
throw new PrestoException(NOT_SUPPORTED, "Unsupported Table type: " + table.getClass().getName());
302+
}
297303
}
298304

299305
public static List<IcebergColumnHandle> getPartitionKeyColumnHandles(IcebergTableHandle tableHandle, Table table, TypeManager typeManager)

0 commit comments

Comments
 (0)