kroushan-nit commented on code in PR #637:
URL: https://github.com/apache/incubator-xtable/pull/637#discussion_r1943424204
##########
xtable-aws/src/main/java/org/apache/xtable/glue/GlueCatalogTableBuilderFactory.java:
##########
@@ -18,25 +18,67 @@
package org.apache.xtable.glue;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
import org.apache.hadoop.conf.Configuration;
+import com.google.common.annotations.VisibleForTesting;
+
import org.apache.xtable.catalog.CatalogTableBuilder;
import org.apache.xtable.exception.NotSupportedException;
+import org.apache.xtable.glue.table.DeltaGlueCatalogTableBuilder;
import org.apache.xtable.glue.table.IcebergGlueCatalogTableBuilder;
+import org.apache.xtable.model.InternalTable;
import org.apache.xtable.model.storage.TableFormat;
+import software.amazon.awssdk.services.glue.model.Column;
import software.amazon.awssdk.services.glue.model.Table;
import software.amazon.awssdk.services.glue.model.TableInput;
-class GlueCatalogTableBuilderFactory {
+public class GlueCatalogTableBuilderFactory {
static CatalogTableBuilder<TableInput, Table> getInstance(
String tableFormat, Configuration configuration) {
switch (tableFormat) {
case TableFormat.ICEBERG:
return new IcebergGlueCatalogTableBuilder(configuration);
+ case TableFormat.DELTA:
+ return new DeltaGlueCatalogTableBuilder();
default:
throw new NotSupportedException("Unsupported table format: " +
tableFormat);
}
}
+
+ @VisibleForTesting
+ public static List<Column> getNonPartitionColumns(
Review Comment:
These methods might get used for hudi as well, so I thought of putting it in
the factory (a common place)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]