Fix storage descriptor test cases
Storage descriptor related test cases were breaking because location is not
always present in case of delta and iceberg tables. However the tableBuilder
used in GlueToPrestoConverter was expecting location to be present internally.
@@ -89,7 +89,7 @@ public final class GlueToPrestoConverter
// the table is an Iceberg/Delta table and decide whether to redirect or fail.
tableBuilder.setDataColumns(ImmutableList.of(new Column("dummy", HIVE_INT, Optional.empty(), Optional.empty())));
tableBuilder.getStorageBuilder().setStorageFormat(StorageFormat.fromHiveStorageFormat(HiveStorageFormat.PARQUET));
- tableBuilder.getStorageBuilder().setLocation(sd.getLocation());
+ tableBuilder.getStorageBuilder().setLocation(sd == null ? "" : sd.getLocation());
}
else {
if (sd == null) {
