use of org.apache.drill.metastore.iceberg.exceptions.IcebergMetastoreException in project drill by apache.
the class TablesOutputDataTransformer method execute.
@Override
public List<TableMetadataUnit> execute() {
List<TableMetadataUnit> results = new ArrayList<>();
for (Map<MethodHandle, Object> valueToSet : valuesToSet()) {
TableMetadataUnit.Builder builder = TableMetadataUnit.builder();
for (Map.Entry<MethodHandle, Object> entry : valueToSet.entrySet()) {
try {
entry.getKey().invokeWithArguments(builder, entry.getValue());
} catch (Throwable e) {
throw new IcebergMetastoreException(String.format("Unable to invoke setter for [%s] using [%s]", TableMetadataUnit.Builder.class.getSimpleName(), entry.getKey()), e);
}
}
results.add(builder.build());
}
return results;
}
Aggregations