rahil-c commented on code in PR #8441:
URL: https://github.com/apache/hudi/pull/8441#discussion_r1171951384


##########
hudi-aws/src/main/java/org/apache/hudi/aws/sync/AWSGlueCatalogSyncClient.java:
##########
@@ -246,22 +248,22 @@ public void updateTableSchema(String tableName, 
MessageType newSchema) {
       Table table = getTable(awsGlue, databaseName, tableName);
       Map<String, String> newSchemaMap = parquetSchemaToMapSchema(newSchema, 
config.getBoolean(HIVE_SUPPORT_TIMESTAMP_TYPE), false);
       List<Column> newColumns = getColumnsFromSchema(newSchemaMap);
-      StorageDescriptor sd = table.getStorageDescriptor();
-      sd.setColumns(newColumns);
-
-      final Date now = new Date();
-      TableInput updatedTableInput = new TableInput()
-          .withName(tableName)
-          .withTableType(table.getTableType())
-          .withParameters(table.getParameters())
-          .withPartitionKeys(table.getPartitionKeys())
-          .withStorageDescriptor(sd)
-          .withLastAccessTime(now)
-          .withLastAnalyzedTime(now);
-
-      UpdateTableRequest request = new UpdateTableRequest()
-          .withDatabaseName(databaseName)
-          .withTableInput(updatedTableInput);
+      StorageDescriptor sd = table.storageDescriptor();
+      StorageDescriptor partitionSD = sd.copy(copySd -> 
copySd.columns(newColumns));
+      final Instant now = Instant.now();
+      TableInput updatedTableInput = TableInput.builder()
+          .tableType(table.tableType())

Review Comment:
   Thanks for catching this, will fix this and check this class once more just 
to be safe for any misses like this



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