danny0405 commented on code in PR #5830:
URL: https://github.com/apache/hudi/pull/5830#discussion_r925301529


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/BaseHoodieWriteClient.java:
##########
@@ -1667,16 +1667,14 @@ public void reOrderColPosition(String colName, String 
referColName, TableChange.
   private Pair<InternalSchema, HoodieTableMetaClient> 
getInternalSchemaAndMetaClient() {
     HoodieTableMetaClient metaClient = createMetaClient(true);
     TableSchemaResolver schemaUtil = new TableSchemaResolver(metaClient);
-    Option<InternalSchema> internalSchemaOption = 
schemaUtil.getTableInternalSchemaFromCommitMetadata();
-    if (!internalSchemaOption.isPresent()) {
-      throw new HoodieException(String.format("cannot find schema for current 
table: %s", config.getBasePath()));
-    }
-    return Pair.of(internalSchemaOption.get(), metaClient);

Review Comment:
   I take a quick look at the PR and feels that the schema about codes is too 
invasive to be everywhere, which is hard to maintain and prone to be buggy, we 
need a more neat way for the code engineering.



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