xixipi-lining commented on code in PR #537:
URL: https://github.com/apache/iceberg-go/pull/537#discussion_r2297778811


##########
catalog/glue/glue.go:
##########
@@ -333,24 +285,11 @@ func (c *Catalog) RegisterTable(ctx context.Context, 
identifier table.Identifier
        if err != nil {
                return nil, fmt.Errorf("failed to read table metadata from %s: 
%w", metadataLocation, err)
        }
-       tableInput := &types.TableInput{
-               Name:       aws.String(tableName),
-               Parameters: map[string]string{},
-               TableType:  aws.String("EXTERNAL_TABLE"),
-               StorageDescriptor: &types.StorageDescriptor{
-                       Location: aws.String(metadataLocation),
-                       Columns:  schemaToGlueColumns(metadata.Schema(), true),
-               },
-       }
+
        _, err = c.glueSvc.CreateTable(ctx, &glue.CreateTableInput{
                CatalogId:    c.catalogId,
                DatabaseName: aws.String(database),
-               TableInput:   tableInput,
-               OpenTableFormatInput: &types.OpenTableFormatInput{
-                       IcebergInput: &types.IcebergInput{
-                               MetadataOperation: 
types.MetadataOperationCreate,
-                       },
-               },

Review Comment:
   Actually, neither 
[Java](https://github.com/apache/iceberg/blob/9c7ed05846c12b542c8c90c9fe6d5dad379f7319/aws/src/main/java/org/apache/iceberg/aws/glue/GlueTableOperations.java#L335)
 nor 
[Python](https://github.com/apache/iceberg-python/blob/a33cd3835136db5939e8eda9ee14a17d51ab141d/pyiceberg/catalog/glue.py#L491)
 uses this parameter, so I think keeping it consistent across languages makes 
sense. The AWS Glue CreateTable API does have this field, but it’s optional, 
and our current `CreateTable` method doesn’t include it either. Having it only 
in RegisterTable seems a bit odd.



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to