xiarixiaoyao commented on a change in pull request #3668:
URL: https://github.com/apache/hudi/pull/3668#discussion_r715457071
##########
File path:
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/AbstractHoodieWriteClient.java
##########
@@ -213,6 +224,27 @@ protected void commit(HoodieTable table, String
commitActionType, String instant
List<HoodieWriteStat> stats) throws IOException {
LOG.info("Committing " + instantTime + " action " + commitActionType);
HoodieActiveTimeline activeTimeline = table.getActiveTimeline();
+ // do save internal schema to support Implicitly add columns in write
process
+ if
(!metadata.getExtraMetadata().containsKey(InternalSchemaParser.LATESTSCHEMA) &&
metadata.getExtraMetadata().containsKey(SCHEMA_KEY)) {
+ TableSchemaResolver schemaUtils = new
TableSchemaResolver(table.getMetaClient());
+ String historySchemaStr =
schemaUtils.getTableHistorySchemaStrFromCommitMetadata().orElse("");
+ if (!historySchemaStr.isEmpty()) {
Review comment:
ok, but now we need to reach agreement on this issue。 vinothchandar
suggest we save those information into metatable。
@vinothchandar What is your opinion on this。
##########
File path:
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/AbstractHoodieWriteClient.java
##########
@@ -1068,4 +1100,150 @@ public void close() {
this.heartbeatClient.stop();
this.txnManager.close();
}
+
+ /**
+ * add columns to table.
+ *
+ * @param colName col name to be added. if we want to add col to a nested
filed, the fullName should be specify
+ * @param schema col type to be added.
+ * @param doc col doc to be added.
+ * @param position col position to be added
+ * @param positionType col position change type. now support three change
types: first/after/before
Review comment:
agree
--
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]