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


##########
catalogs/catalog-glue/src/main/java/org/apache/gravitino/catalog/glue/GlueColumn.java:
##########
@@ -0,0 +1,83 @@
+/*
+ * 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 lombok.EqualsAndHashCode;
+import org.apache.gravitino.connector.BaseColumn;
+import software.amazon.awssdk.services.glue.model.Column;
+
+/** Represents an AWS Glue {@link Column} as a Gravitino column. */
+@EqualsAndHashCode(callSuper = true)
+public class GlueColumn extends BaseColumn {
+
+  private GlueColumn() {}
+
+  /**
+   * Converts an AWS Glue {@link Column} to a {@link GlueColumn}.
+   *
+   * <p>Field mapping:
+   *
+   * <ul>
+   *   <li>{@code Column.name()} → {@code name}
+   *   <li>{@code Column.type()} → {@code dataType} via {@link 
GlueTypeConverter#toGravitino}
+   *   <li>{@code Column.comment()} → {@code comment} (nullable)
+   *   <li>Glue has no nullability metadata → {@code nullable = true} always
+   *   <li>Glue has no auto-increment concept → {@code autoIncrement = false} 
always
+   * </ul>
+   *
+   * @param glueColumn the Glue Column returned by the AWS SDK
+   * @param typeConverter the type converter to use for column type mapping
+   * @return a populated {@link GlueColumn}
+   */
+  public static GlueColumn fromGlueColumn(Column glueColumn, GlueTypeConverter 
typeConverter) {
+    return GlueColumn.builder()
+        .withName(glueColumn.name())
+        .withType(typeConverter.toGravitino(glueColumn.type()))
+        .withComment(glueColumn.comment())
+        .withNullable(true)

Review Comment:
   The link is In the GlueCatalogCapacity



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