yuqi1129 commented on code in PR #10781:
URL: https://github.com/apache/gravitino/pull/10781#discussion_r3123606498


##########
catalogs/catalog-glue/build.gradle.kts:
##########
@@ -88,12 +88,7 @@ tasks {
 }
 
 tasks.test {
-  val skipITs = project.hasProperty("skipITs")

Review Comment:
   Why do you modify here?



##########
catalogs/catalog-glue/src/main/java/org/apache/gravitino/catalog/glue/GlueTypeConverter.java:
##########
@@ -0,0 +1,165 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.gravitino.catalog.glue;
+
+import static java.util.Locale.ROOT;
+
+import org.apache.gravitino.rel.types.Type;
+import org.apache.gravitino.rel.types.Types;
+
+/**
+ * Converts between AWS Glue / Hive type strings and Gravitino {@link Type} 
objects.
+ *
+ * <p>Glue stores column types as Hive type strings (e.g. {@code "bigint"}, 
{@code "decimal(10,2)"},
+ * {@code "array<string>"}). This converter handles all primitive types 
natively; complex and
+ * unknown types fall back to {@link Types.ExternalType} to preserve the 
original string.
+ */
+public final class GlueTypeConverter {
+
+  private GlueTypeConverter() {}
+
+  /**
+   * Converts a Glue/Hive type string to a Gravitino {@link Type}.
+   *
+   * @param glueType the Hive type string from {@code Column.type()} 
(case-insensitive)
+   * @return the corresponding Gravitino {@link Type}; unknown types become 
{@link
+   *     Types.ExternalType}
+   */
+  public static Type toGravitino(String glueType) {

Review Comment:
   I remember that there should be an interface to define type mapping between 
catalogs and Gravitino, why do you add it again?



##########
catalogs/catalog-glue/src/main/java/org/apache/gravitino/catalog/glue/GlueTable.java:
##########
@@ -0,0 +1,216 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.gravitino.catalog.glue;
+
+import static org.apache.gravitino.catalog.glue.GlueConstants.INPUT_FORMAT;
+import static org.apache.gravitino.catalog.glue.GlueConstants.LOCATION;
+import static org.apache.gravitino.catalog.glue.GlueConstants.OUTPUT_FORMAT;
+import static org.apache.gravitino.catalog.glue.GlueConstants.SERDE_LIB;
+import static org.apache.gravitino.catalog.glue.GlueConstants.SERDE_NAME;
+import static 
org.apache.gravitino.catalog.glue.GlueConstants.SERDE_PARAMETER_PREFIX;
+import static org.apache.gravitino.catalog.glue.GlueConstants.TABLE_TYPE;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import lombok.ToString;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.gravitino.connector.BaseTable;
+import org.apache.gravitino.connector.TableOperations;
+import org.apache.gravitino.meta.AuditInfo;
+import org.apache.gravitino.rel.Column;
+import org.apache.gravitino.rel.expressions.NamedReference;
+import org.apache.gravitino.rel.expressions.distributions.Distribution;
+import org.apache.gravitino.rel.expressions.distributions.Distributions;
+import org.apache.gravitino.rel.expressions.sorts.SortDirection;
+import org.apache.gravitino.rel.expressions.sorts.SortOrder;
+import org.apache.gravitino.rel.expressions.sorts.SortOrders;
+import org.apache.gravitino.rel.expressions.transforms.Transform;
+import org.apache.gravitino.rel.expressions.transforms.Transforms;
+import software.amazon.awssdk.services.glue.model.StorageDescriptor;
+import software.amazon.awssdk.services.glue.model.Table;
+
+/**
+ * Represents an AWS Glue {@link Table} as a Gravitino table.
+ *
+ * <p>All entries in {@code Table.parameters()} pass through intact (including 
{@code table_type},
+ * {@code metadata_location}, etc.), so downstream tools can correctly 
identify the table format.
+ * StorageDescriptor fields (location, formats, SerDe) are surfaced as 
additional properties.
+ */
+@ToString
+public class GlueTable extends BaseTable {
+
+  private GlueTable() {}
+
+  @Override
+  protected TableOperations newOps() {
+    // Partition operations are deferred to PR-06.

Review Comment:
   Comments like this one are meaningless, and you need to remove them.



-- 
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]

Reply via email to