File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
presto-iceberg/src/main/java/com/facebook/presto/iceberg Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments