You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/03/14 06:28:59 UTC

[GitHub] [hudi] wangxianghu opened a new pull request #5031: [HUDI-3523] Introduce AddColumnSchemaPostProcessor to support add columns to the end of a schema

wangxianghu opened a new pull request #5031:
URL: https://github.com/apache/hudi/pull/5031


   …umns to the end of a schema
   
   ## *Tips*
   - *Thank you very much for contributing to Apache Hudi.*
   - *Please review https://hudi.apache.org/contribute/how-to-contribute before opening a pull request.*
   
   ## What is the purpose of the pull request
   
   *(For example: This pull request adds quick-start document.)*
   
   ## Brief change log
   
   *(for example:)*
     - *Modify AnnotationLocation checkstyle rule in checkstyle.xml*
   
   ## Verify this pull request
   
   *(Please pick either of the following options)*
   
   This pull request is a trivial rework / code cleanup without any test coverage.
   
   *(or)*
   
   This pull request is already covered by existing tests, such as *(please describe tests)*.
   
   (or)
   
   This change added tests and can be verified as follows:
   
   *(example:)*
   
     - *Added integration tests for end-to-end.*
     - *Added HoodieClientWriteTest to verify the change.*
     - *Manually verified the change by running a job locally.*
   
   ## Committer checklist
   
    - [ ] Has a corresponding JIRA in PR title & commit
    
    - [ ] Commit message is descriptive of the change
    
    - [ ] CI is green
   
    - [ ] Necessary doc changes done or have another open PR
          
    - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.
   


-- 
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: commits-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] hudi-bot removed a comment on pull request #5031: [HUDI-3523] Introduce AddColumnSchemaPostProcessor to support add column to a given schema

Posted by GitBox <gi...@apache.org>.
hudi-bot removed a comment on pull request #5031:
URL: https://github.com/apache/hudi/pull/5031#issuecomment-1066560588


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "4b0f53f54af7d2762739a82df6b2bc2a8ddc899b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6911",
       "triggerID" : "4b0f53f54af7d2762739a82df6b2bc2a8ddc899b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ef59e8cc44406e42c05ee5c538753f6656aa8bd0",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6914",
       "triggerID" : "ef59e8cc44406e42c05ee5c538753f6656aa8bd0",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * ef59e8cc44406e42c05ee5c538753f6656aa8bd0 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6914) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] hudi-bot commented on pull request #5031: [HUDI-3523] Introduce AddColumnSchemaPostProcessor to support add column to a given schema

Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #5031:
URL: https://github.com/apache/hudi/pull/5031#issuecomment-1067723569


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "4b0f53f54af7d2762739a82df6b2bc2a8ddc899b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6911",
       "triggerID" : "4b0f53f54af7d2762739a82df6b2bc2a8ddc899b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ef59e8cc44406e42c05ee5c538753f6656aa8bd0",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6914",
       "triggerID" : "ef59e8cc44406e42c05ee5c538753f6656aa8bd0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ef59e8cc44406e42c05ee5c538753f6656aa8bd0",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6957",
       "triggerID" : "1067661400",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * ef59e8cc44406e42c05ee5c538753f6656aa8bd0 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6914) Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6957) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] nsivabalan commented on a change in pull request #5031: [HUDI-3523] Introduce AddColumnSchemaPostProcessor to support add column to a given schema

Posted by GitBox <gi...@apache.org>.
nsivabalan commented on a change in pull request #5031:
URL: https://github.com/apache/hudi/pull/5031#discussion_r829454938



##########
File path: hudi-utilities/src/main/java/org/apache/hudi/utilities/schema/AddColumnSchemaPostProcessor.java
##########
@@ -0,0 +1,172 @@
+/*
+ * 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.hudi.utilities.schema;
+
+import org.apache.hudi.common.config.ConfigProperty;
+import org.apache.hudi.common.config.TypedProperties;
+import org.apache.hudi.common.model.HoodieRecord;
+import org.apache.hudi.utilities.exception.HoodieSchemaPostProcessException;
+
+import org.apache.avro.LogicalTypes;
+import org.apache.avro.Schema;
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Logger;
+import org.apache.spark.api.java.JavaSparkContext;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+
+/**
+ * A {@link SchemaPostProcessor} use to add column to given schema. Currently. only supports adding one column at a time.
+ * Users can specify the position of new column by config {@link Config#SCHEMA_POST_PROCESSOR_ADD_COLUMN_NEXT_PROP},
+ * the new column will be added before this column.
+ * <p>
+ * Currently supported types : bytes, string, int, long, float, double, boolean, decimal
+ */

Review comment:
       I understand this is schema post processor. But can we add a line here in documentation that i hudi, adding a new column in the middle may not be advisable. users might run into issues. So, its always a good practice to append new columns to the end. 
   

##########
File path: hudi-utilities/src/main/java/org/apache/hudi/utilities/schema/AddColumnSchemaPostProcessor.java
##########
@@ -0,0 +1,172 @@
+/*
+ * 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.hudi.utilities.schema;
+
+import org.apache.hudi.common.config.ConfigProperty;
+import org.apache.hudi.common.config.TypedProperties;
+import org.apache.hudi.common.model.HoodieRecord;
+import org.apache.hudi.utilities.exception.HoodieSchemaPostProcessException;
+
+import org.apache.avro.LogicalTypes;
+import org.apache.avro.Schema;
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Logger;
+import org.apache.spark.api.java.JavaSparkContext;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+
+/**
+ * A {@link SchemaPostProcessor} use to add column to given schema. Currently. only supports adding one column at a time.
+ * Users can specify the position of new column by config {@link Config#SCHEMA_POST_PROCESSOR_ADD_COLUMN_NEXT_PROP},
+ * the new column will be added before this column.
+ * <p>
+ * Currently supported types : bytes, string, int, long, float, double, boolean, decimal
+ */
+public class AddColumnSchemaPostProcessor extends SchemaPostProcessor {
+
+  private static final Logger LOG = LogManager.getLogger(AddColumnSchemaPostProcessor.class);
+
+  public AddColumnSchemaPostProcessor(TypedProperties props, JavaSparkContext jssc) {
+    super(props, jssc);
+  }
+
+  /**
+   * Configs supported.
+   */
+  public static class Config {
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_NAME_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.name")
+        .noDefaultValue()
+        .withDocumentation("New column's name");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_TYPE_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.type")
+        .noDefaultValue()
+        .withDocumentation("New column's type");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_DOC_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.doc")
+        .noDefaultValue()
+        .withDocumentation("New column's doc");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_DEFAULT_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.default")
+        .noDefaultValue()
+        .withDocumentation("New column's default value");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_SIZE_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.size")
+        .noDefaultValue()
+        .withDocumentation("New column's size, used in decimal type");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_PRECISION_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.precision")
+        .noDefaultValue()
+        .withDocumentation("New column's precision, used in decimal type");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_SCALE_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.scale")
+        .noDefaultValue()
+        .withDocumentation("New column's precision, used in decimal type");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_NEXT_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.next")
+        .defaultValue(HoodieRecord.HOODIE_IS_DELETED)
+        .withDocumentation("Column name which locate next to new column, `_hoodie_is_deleted` by default.");
+  }
+
+  public static final String BYTES = "BYTES";
+  public static final String STRING = "STRING";
+  public static final String INT = "INT";
+  public static final String LONG = "LONG";
+  public static final String FLOAT = "FLOAT";
+  public static final String DOUBLE = "DOUBLE";
+  public static final String BOOLEAN = "BOOLEAN";
+  public static final String DECIMAL = "DECIMAL";
+
+  @Override
+  public Schema processSchema(Schema schema) {
+    String newColumnName = this.config.getString(Config.SCHEMA_POST_PROCESSOR_ADD_COLUMN_NAME_PROP.key());
+
+    if (schema.getField(newColumnName) != null) {
+      LOG.warn(String.format("Column %s already exist!", newColumnName));
+      return schema;
+    }
+
+    List<Schema.Field> sourceFields = schema.getFields();
+    List<Schema.Field> targetFields = new ArrayList<>(sourceFields.size() + 1);
+
+    String nextColumnName = this.config.getString(Config.SCHEMA_POST_PROCESSOR_ADD_COLUMN_NEXT_PROP.key(),
+        Config.SCHEMA_POST_PROCESSOR_ADD_COLUMN_NEXT_PROP.defaultValue());
+
+    // mark whether the new column is added
+    boolean isAdded = false;
+    for (Schema.Field sourceField : sourceFields) {
+      if (sourceField.name().equals(nextColumnName)) {
+        targetFields.add(buildNewColumn());
+        isAdded = true;
+      }
+      targetFields.add(new Schema.Field(sourceField.name(), sourceField.schema(), sourceField.doc(), sourceField.defaultVal()));

Review comment:
       from the documentation, I thought we will add the new column after the column specified in Config.SCHEMA_POST_PROCESSOR_ADD_COLUMN_NEXT_PROP. But guess, we are adding the new column prior to that. Can we please clarify this in documentation. Or may be give an example. 

##########
File path: hudi-utilities/src/main/java/org/apache/hudi/utilities/schema/AddColumnSchemaPostProcessor.java
##########
@@ -0,0 +1,172 @@
+/*
+ * 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.hudi.utilities.schema;
+
+import org.apache.hudi.common.config.ConfigProperty;
+import org.apache.hudi.common.config.TypedProperties;
+import org.apache.hudi.common.model.HoodieRecord;
+import org.apache.hudi.utilities.exception.HoodieSchemaPostProcessException;
+
+import org.apache.avro.LogicalTypes;
+import org.apache.avro.Schema;
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Logger;
+import org.apache.spark.api.java.JavaSparkContext;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+
+/**
+ * A {@link SchemaPostProcessor} use to add column to given schema. Currently. only supports adding one column at a time.
+ * Users can specify the position of new column by config {@link Config#SCHEMA_POST_PROCESSOR_ADD_COLUMN_NEXT_PROP},
+ * the new column will be added before this column.
+ * <p>
+ * Currently supported types : bytes, string, int, long, float, double, boolean, decimal
+ */
+public class AddColumnSchemaPostProcessor extends SchemaPostProcessor {
+
+  private static final Logger LOG = LogManager.getLogger(AddColumnSchemaPostProcessor.class);
+
+  public AddColumnSchemaPostProcessor(TypedProperties props, JavaSparkContext jssc) {
+    super(props, jssc);
+  }
+
+  /**
+   * Configs supported.
+   */
+  public static class Config {
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_NAME_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.name")
+        .noDefaultValue()
+        .withDocumentation("New column's name");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_TYPE_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.type")
+        .noDefaultValue()
+        .withDocumentation("New column's type");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_DOC_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.doc")
+        .noDefaultValue()
+        .withDocumentation("New column's doc");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_DEFAULT_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.default")
+        .noDefaultValue()
+        .withDocumentation("New column's default value");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_SIZE_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.size")
+        .noDefaultValue()
+        .withDocumentation("New column's size, used in decimal type");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_PRECISION_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.precision")
+        .noDefaultValue()
+        .withDocumentation("New column's precision, used in decimal type");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_SCALE_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.scale")
+        .noDefaultValue()
+        .withDocumentation("New column's precision, used in decimal type");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_NEXT_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.next")
+        .defaultValue(HoodieRecord.HOODIE_IS_DELETED)
+        .withDocumentation("Column name which locate next to new column, `_hoodie_is_deleted` by default.");
+  }
+
+  public static final String BYTES = "BYTES";
+  public static final String STRING = "STRING";
+  public static final String INT = "INT";
+  public static final String LONG = "LONG";
+  public static final String FLOAT = "FLOAT";
+  public static final String DOUBLE = "DOUBLE";
+  public static final String BOOLEAN = "BOOLEAN";
+  public static final String DECIMAL = "DECIMAL";
+
+  @Override
+  public Schema processSchema(Schema schema) {
+    String newColumnName = this.config.getString(Config.SCHEMA_POST_PROCESSOR_ADD_COLUMN_NAME_PROP.key());
+
+    if (schema.getField(newColumnName) != null) {
+      LOG.warn(String.format("Column %s already exist!", newColumnName));
+      return schema;
+    }
+
+    List<Schema.Field> sourceFields = schema.getFields();
+    List<Schema.Field> targetFields = new ArrayList<>(sourceFields.size() + 1);
+
+    String nextColumnName = this.config.getString(Config.SCHEMA_POST_PROCESSOR_ADD_COLUMN_NEXT_PROP.key(),
+        Config.SCHEMA_POST_PROCESSOR_ADD_COLUMN_NEXT_PROP.defaultValue());
+
+    // mark whether the new column is added
+    boolean isAdded = false;
+    for (Schema.Field sourceField : sourceFields) {
+      if (sourceField.name().equals(nextColumnName)) {
+        targetFields.add(buildNewColumn());
+        isAdded = true;
+      }
+      targetFields.add(new Schema.Field(sourceField.name(), sourceField.schema(), sourceField.doc(), sourceField.defaultVal()));
+    }
+
+    // this would happen when `nextColumn` does not exist. just append the new column to the end
+    if (!isAdded) {
+      targetFields.add(buildNewColumn());
+    }
+
+    return Schema.createRecord(schema.getName(), schema.getDoc(), schema.getNamespace(), false, targetFields);
+  }
+
+  private Schema.Field buildNewColumn() {
+    Schema.Field result;
+
+    String columnName = this.config.getString(Config.SCHEMA_POST_PROCESSOR_ADD_COLUMN_NAME_PROP.key());
+    String type = this.config.getString(Config.SCHEMA_POST_PROCESSOR_ADD_COLUMN_TYPE_PROP.key()).toUpperCase(Locale.ROOT);
+    String doc = this.config.getString(Config.SCHEMA_POST_PROCESSOR_ADD_COLUMN_DOC_PROP.key(), null);
+    Object defaultValue = this.config.getOrDefault(Config.SCHEMA_POST_PROCESSOR_ADD_COLUMN_DEFAULT_PROP.key(),
+        null);
+
+    switch (type) {
+      case STRING:
+      case BYTES:
+      case INT:
+      case LONG:
+      case FLOAT:
+      case DOUBLE:
+      case BOOLEAN:

Review comment:
       so, looks like we are supporting only primitives here. I don't see arrays or maps etc. Can we call it out in the class documentation. would like to understand why we have such a limitation. why not add all diff types? 
   

##########
File path: hudi-utilities/src/main/java/org/apache/hudi/utilities/schema/AddColumnSchemaPostProcessor.java
##########
@@ -0,0 +1,172 @@
+/*
+ * 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.hudi.utilities.schema;
+
+import org.apache.hudi.common.config.ConfigProperty;
+import org.apache.hudi.common.config.TypedProperties;
+import org.apache.hudi.common.model.HoodieRecord;
+import org.apache.hudi.utilities.exception.HoodieSchemaPostProcessException;
+
+import org.apache.avro.LogicalTypes;
+import org.apache.avro.Schema;
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Logger;
+import org.apache.spark.api.java.JavaSparkContext;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+
+/**
+ * A {@link SchemaPostProcessor} use to add column to given schema. Currently. only supports adding one column at a time.
+ * Users can specify the position of new column by config {@link Config#SCHEMA_POST_PROCESSOR_ADD_COLUMN_NEXT_PROP},
+ * the new column will be added before this column.
+ * <p>
+ * Currently supported types : bytes, string, int, long, float, double, boolean, decimal
+ */
+public class AddColumnSchemaPostProcessor extends SchemaPostProcessor {
+
+  private static final Logger LOG = LogManager.getLogger(AddColumnSchemaPostProcessor.class);
+
+  public AddColumnSchemaPostProcessor(TypedProperties props, JavaSparkContext jssc) {
+    super(props, jssc);
+  }
+
+  /**
+   * Configs supported.
+   */
+  public static class Config {
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_NAME_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.name")
+        .noDefaultValue()
+        .withDocumentation("New column's name");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_TYPE_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.type")
+        .noDefaultValue()
+        .withDocumentation("New column's type");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_DOC_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.doc")
+        .noDefaultValue()
+        .withDocumentation("New column's doc");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_DEFAULT_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.default")
+        .noDefaultValue()
+        .withDocumentation("New column's default value");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_SIZE_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.size")
+        .noDefaultValue()
+        .withDocumentation("New column's size, used in decimal type");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_PRECISION_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.precision")
+        .noDefaultValue()
+        .withDocumentation("New column's precision, used in decimal type");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_SCALE_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.scale")
+        .noDefaultValue()
+        .withDocumentation("New column's precision, used in decimal type");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_NEXT_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.next")
+        .defaultValue(HoodieRecord.HOODIE_IS_DELETED)

Review comment:
       there should not be any default. We should just append to the end by defualt




-- 
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: commits-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] hudi-bot removed a comment on pull request #5031: [HUDI-3523] Introduce AddColumnSchemaPostProcessor to support add column to a given schema

Posted by GitBox <gi...@apache.org>.
hudi-bot removed a comment on pull request #5031:
URL: https://github.com/apache/hudi/pull/5031#issuecomment-1066429523


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "4b0f53f54af7d2762739a82df6b2bc2a8ddc899b",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6911",
       "triggerID" : "4b0f53f54af7d2762739a82df6b2bc2a8ddc899b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4b0f53f54af7d2762739a82df6b2bc2a8ddc899b Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6911) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] wangxianghu commented on pull request #5031: [HUDI-3523] Introduce AddColumnSchemaPostProcessor to support add column to a given schema

Posted by GitBox <gi...@apache.org>.
wangxianghu commented on pull request #5031:
URL: https://github.com/apache/hudi/pull/5031#issuecomment-1067661400


   @hudi-bot run azure


-- 
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: commits-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] hudi-bot removed a comment on pull request #5031: [HUDI-3523] Introduce AddColumnSchemaPostProcessor to support add column to a given schema

Posted by GitBox <gi...@apache.org>.
hudi-bot removed a comment on pull request #5031:
URL: https://github.com/apache/hudi/pull/5031#issuecomment-1066465881


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "4b0f53f54af7d2762739a82df6b2bc2a8ddc899b",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6911",
       "triggerID" : "4b0f53f54af7d2762739a82df6b2bc2a8ddc899b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ef59e8cc44406e42c05ee5c538753f6656aa8bd0",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6914",
       "triggerID" : "ef59e8cc44406e42c05ee5c538753f6656aa8bd0",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4b0f53f54af7d2762739a82df6b2bc2a8ddc899b Azure: [CANCELED](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6911) 
   * ef59e8cc44406e42c05ee5c538753f6656aa8bd0 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6914) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] hudi-bot commented on pull request #5031: [HUDI-3523] Introduce AddColumnSchemaPostProcessor to support add columns to the end of a schema

Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #5031:
URL: https://github.com/apache/hudi/pull/5031#issuecomment-1066428073


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "4b0f53f54af7d2762739a82df6b2bc2a8ddc899b",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "4b0f53f54af7d2762739a82df6b2bc2a8ddc899b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4b0f53f54af7d2762739a82df6b2bc2a8ddc899b UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] pratyakshsharma commented on a change in pull request #5031: [HUDI-3523] Introduce AddColumnSchemaPostProcessor to support add column to a given schema

Posted by GitBox <gi...@apache.org>.
pratyakshsharma commented on a change in pull request #5031:
URL: https://github.com/apache/hudi/pull/5031#discussion_r830484457



##########
File path: hudi-utilities/src/main/java/org/apache/hudi/utilities/schema/AddColumnSchemaPostProcessor.java
##########
@@ -0,0 +1,172 @@
+/*
+ * 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.hudi.utilities.schema;
+
+import org.apache.hudi.common.config.ConfigProperty;
+import org.apache.hudi.common.config.TypedProperties;
+import org.apache.hudi.common.model.HoodieRecord;
+import org.apache.hudi.utilities.exception.HoodieSchemaPostProcessException;
+
+import org.apache.avro.LogicalTypes;
+import org.apache.avro.Schema;
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Logger;
+import org.apache.spark.api.java.JavaSparkContext;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+
+/**
+ * A {@link SchemaPostProcessor} use to add column to given schema. Currently. only supports adding one column at a time.

Review comment:
       nit: use -> used




-- 
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: commits-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] hudi-bot commented on pull request #5031: [HUDI-3523] Introduce AddColumnSchemaPostProcessor to support add column to a given schema

Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #5031:
URL: https://github.com/apache/hudi/pull/5031#issuecomment-1066464076


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "4b0f53f54af7d2762739a82df6b2bc2a8ddc899b",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6911",
       "triggerID" : "4b0f53f54af7d2762739a82df6b2bc2a8ddc899b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ef59e8cc44406e42c05ee5c538753f6656aa8bd0",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "ef59e8cc44406e42c05ee5c538753f6656aa8bd0",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4b0f53f54af7d2762739a82df6b2bc2a8ddc899b Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6911) 
   * ef59e8cc44406e42c05ee5c538753f6656aa8bd0 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] hudi-bot removed a comment on pull request #5031: [HUDI-3523] Introduce AddColumnSchemaPostProcessor to support add column to a given schema

Posted by GitBox <gi...@apache.org>.
hudi-bot removed a comment on pull request #5031:
URL: https://github.com/apache/hudi/pull/5031#issuecomment-1067662681


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "4b0f53f54af7d2762739a82df6b2bc2a8ddc899b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6911",
       "triggerID" : "4b0f53f54af7d2762739a82df6b2bc2a8ddc899b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ef59e8cc44406e42c05ee5c538753f6656aa8bd0",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6914",
       "triggerID" : "ef59e8cc44406e42c05ee5c538753f6656aa8bd0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ef59e8cc44406e42c05ee5c538753f6656aa8bd0",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6957",
       "triggerID" : "1067661400",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * ef59e8cc44406e42c05ee5c538753f6656aa8bd0 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6914) Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6957) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] pratyakshsharma commented on a change in pull request #5031: [HUDI-3523] Introduce AddColumnSchemaPostProcessor to support add column to a given schema

Posted by GitBox <gi...@apache.org>.
pratyakshsharma commented on a change in pull request #5031:
URL: https://github.com/apache/hudi/pull/5031#discussion_r830484809



##########
File path: hudi-utilities/src/main/java/org/apache/hudi/utilities/schema/AddColumnSchemaPostProcessor.java
##########
@@ -0,0 +1,172 @@
+/*
+ * 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.hudi.utilities.schema;
+
+import org.apache.hudi.common.config.ConfigProperty;
+import org.apache.hudi.common.config.TypedProperties;
+import org.apache.hudi.common.model.HoodieRecord;
+import org.apache.hudi.utilities.exception.HoodieSchemaPostProcessException;
+
+import org.apache.avro.LogicalTypes;
+import org.apache.avro.Schema;
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Logger;
+import org.apache.spark.api.java.JavaSparkContext;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+
+/**
+ * A {@link SchemaPostProcessor} use to add column to given schema. Currently. only supports adding one column at a time.
+ * Users can specify the position of new column by config {@link Config#SCHEMA_POST_PROCESSOR_ADD_COLUMN_NEXT_PROP},
+ * the new column will be added before this column.
+ * <p>
+ * Currently supported types : bytes, string, int, long, float, double, boolean, decimal
+ */
+public class AddColumnSchemaPostProcessor extends SchemaPostProcessor {
+
+  private static final Logger LOG = LogManager.getLogger(AddColumnSchemaPostProcessor.class);
+
+  public AddColumnSchemaPostProcessor(TypedProperties props, JavaSparkContext jssc) {
+    super(props, jssc);
+  }
+
+  /**
+   * Configs supported.
+   */
+  public static class Config {
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_NAME_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.name")
+        .noDefaultValue()
+        .withDocumentation("New column's name");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_TYPE_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.type")
+        .noDefaultValue()
+        .withDocumentation("New column's type");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_DOC_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.doc")
+        .noDefaultValue()
+        .withDocumentation("New column's doc");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_DEFAULT_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.default")
+        .noDefaultValue()
+        .withDocumentation("New column's default value");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_SIZE_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.size")
+        .noDefaultValue()
+        .withDocumentation("New column's size, used in decimal type");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_PRECISION_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.precision")
+        .noDefaultValue()
+        .withDocumentation("New column's precision, used in decimal type");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_SCALE_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.scale")
+        .noDefaultValue()
+        .withDocumentation("New column's precision, used in decimal type");

Review comment:
       what is the difference between SCHEMA_POST_PROCESSOR_ADD_COLUMN_SCALE_PROP and SCHEMA_POST_PROCESSOR_ADD_COLUMN_PRECISION_PROP? Both have the same documentation.




-- 
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: commits-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] nsivabalan commented on a change in pull request #5031: [HUDI-3523] Introduce AddColumnSchemaPostProcessor to support add column to a given schema

Posted by GitBox <gi...@apache.org>.
nsivabalan commented on a change in pull request #5031:
URL: https://github.com/apache/hudi/pull/5031#discussion_r829454938



##########
File path: hudi-utilities/src/main/java/org/apache/hudi/utilities/schema/AddColumnSchemaPostProcessor.java
##########
@@ -0,0 +1,172 @@
+/*
+ * 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.hudi.utilities.schema;
+
+import org.apache.hudi.common.config.ConfigProperty;
+import org.apache.hudi.common.config.TypedProperties;
+import org.apache.hudi.common.model.HoodieRecord;
+import org.apache.hudi.utilities.exception.HoodieSchemaPostProcessException;
+
+import org.apache.avro.LogicalTypes;
+import org.apache.avro.Schema;
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Logger;
+import org.apache.spark.api.java.JavaSparkContext;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+
+/**
+ * A {@link SchemaPostProcessor} use to add column to given schema. Currently. only supports adding one column at a time.
+ * Users can specify the position of new column by config {@link Config#SCHEMA_POST_PROCESSOR_ADD_COLUMN_NEXT_PROP},
+ * the new column will be added before this column.
+ * <p>
+ * Currently supported types : bytes, string, int, long, float, double, boolean, decimal
+ */

Review comment:
       I understand this is schema post processor. But can we add a line here in documentation that i hudi, adding a new column in the middle may not be advisable. users might run into issues. So, its always a good practice to append new columns to the end. 
   

##########
File path: hudi-utilities/src/main/java/org/apache/hudi/utilities/schema/AddColumnSchemaPostProcessor.java
##########
@@ -0,0 +1,172 @@
+/*
+ * 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.hudi.utilities.schema;
+
+import org.apache.hudi.common.config.ConfigProperty;
+import org.apache.hudi.common.config.TypedProperties;
+import org.apache.hudi.common.model.HoodieRecord;
+import org.apache.hudi.utilities.exception.HoodieSchemaPostProcessException;
+
+import org.apache.avro.LogicalTypes;
+import org.apache.avro.Schema;
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Logger;
+import org.apache.spark.api.java.JavaSparkContext;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+
+/**
+ * A {@link SchemaPostProcessor} use to add column to given schema. Currently. only supports adding one column at a time.
+ * Users can specify the position of new column by config {@link Config#SCHEMA_POST_PROCESSOR_ADD_COLUMN_NEXT_PROP},
+ * the new column will be added before this column.
+ * <p>
+ * Currently supported types : bytes, string, int, long, float, double, boolean, decimal
+ */
+public class AddColumnSchemaPostProcessor extends SchemaPostProcessor {
+
+  private static final Logger LOG = LogManager.getLogger(AddColumnSchemaPostProcessor.class);
+
+  public AddColumnSchemaPostProcessor(TypedProperties props, JavaSparkContext jssc) {
+    super(props, jssc);
+  }
+
+  /**
+   * Configs supported.
+   */
+  public static class Config {
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_NAME_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.name")
+        .noDefaultValue()
+        .withDocumentation("New column's name");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_TYPE_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.type")
+        .noDefaultValue()
+        .withDocumentation("New column's type");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_DOC_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.doc")
+        .noDefaultValue()
+        .withDocumentation("New column's doc");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_DEFAULT_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.default")
+        .noDefaultValue()
+        .withDocumentation("New column's default value");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_SIZE_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.size")
+        .noDefaultValue()
+        .withDocumentation("New column's size, used in decimal type");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_PRECISION_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.precision")
+        .noDefaultValue()
+        .withDocumentation("New column's precision, used in decimal type");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_SCALE_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.scale")
+        .noDefaultValue()
+        .withDocumentation("New column's precision, used in decimal type");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_NEXT_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.next")
+        .defaultValue(HoodieRecord.HOODIE_IS_DELETED)
+        .withDocumentation("Column name which locate next to new column, `_hoodie_is_deleted` by default.");
+  }
+
+  public static final String BYTES = "BYTES";
+  public static final String STRING = "STRING";
+  public static final String INT = "INT";
+  public static final String LONG = "LONG";
+  public static final String FLOAT = "FLOAT";
+  public static final String DOUBLE = "DOUBLE";
+  public static final String BOOLEAN = "BOOLEAN";
+  public static final String DECIMAL = "DECIMAL";
+
+  @Override
+  public Schema processSchema(Schema schema) {
+    String newColumnName = this.config.getString(Config.SCHEMA_POST_PROCESSOR_ADD_COLUMN_NAME_PROP.key());
+
+    if (schema.getField(newColumnName) != null) {
+      LOG.warn(String.format("Column %s already exist!", newColumnName));
+      return schema;
+    }
+
+    List<Schema.Field> sourceFields = schema.getFields();
+    List<Schema.Field> targetFields = new ArrayList<>(sourceFields.size() + 1);
+
+    String nextColumnName = this.config.getString(Config.SCHEMA_POST_PROCESSOR_ADD_COLUMN_NEXT_PROP.key(),
+        Config.SCHEMA_POST_PROCESSOR_ADD_COLUMN_NEXT_PROP.defaultValue());
+
+    // mark whether the new column is added
+    boolean isAdded = false;
+    for (Schema.Field sourceField : sourceFields) {
+      if (sourceField.name().equals(nextColumnName)) {
+        targetFields.add(buildNewColumn());
+        isAdded = true;
+      }
+      targetFields.add(new Schema.Field(sourceField.name(), sourceField.schema(), sourceField.doc(), sourceField.defaultVal()));

Review comment:
       from the documentation, I thought we will add the new column after the column specified in Config.SCHEMA_POST_PROCESSOR_ADD_COLUMN_NEXT_PROP. But guess, we are adding the new column prior to that. Can we please clarify this in documentation. Or may be give an example. 

##########
File path: hudi-utilities/src/main/java/org/apache/hudi/utilities/schema/AddColumnSchemaPostProcessor.java
##########
@@ -0,0 +1,172 @@
+/*
+ * 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.hudi.utilities.schema;
+
+import org.apache.hudi.common.config.ConfigProperty;
+import org.apache.hudi.common.config.TypedProperties;
+import org.apache.hudi.common.model.HoodieRecord;
+import org.apache.hudi.utilities.exception.HoodieSchemaPostProcessException;
+
+import org.apache.avro.LogicalTypes;
+import org.apache.avro.Schema;
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Logger;
+import org.apache.spark.api.java.JavaSparkContext;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+
+/**
+ * A {@link SchemaPostProcessor} use to add column to given schema. Currently. only supports adding one column at a time.
+ * Users can specify the position of new column by config {@link Config#SCHEMA_POST_PROCESSOR_ADD_COLUMN_NEXT_PROP},
+ * the new column will be added before this column.
+ * <p>
+ * Currently supported types : bytes, string, int, long, float, double, boolean, decimal
+ */
+public class AddColumnSchemaPostProcessor extends SchemaPostProcessor {
+
+  private static final Logger LOG = LogManager.getLogger(AddColumnSchemaPostProcessor.class);
+
+  public AddColumnSchemaPostProcessor(TypedProperties props, JavaSparkContext jssc) {
+    super(props, jssc);
+  }
+
+  /**
+   * Configs supported.
+   */
+  public static class Config {
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_NAME_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.name")
+        .noDefaultValue()
+        .withDocumentation("New column's name");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_TYPE_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.type")
+        .noDefaultValue()
+        .withDocumentation("New column's type");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_DOC_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.doc")
+        .noDefaultValue()
+        .withDocumentation("New column's doc");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_DEFAULT_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.default")
+        .noDefaultValue()
+        .withDocumentation("New column's default value");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_SIZE_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.size")
+        .noDefaultValue()
+        .withDocumentation("New column's size, used in decimal type");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_PRECISION_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.precision")
+        .noDefaultValue()
+        .withDocumentation("New column's precision, used in decimal type");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_SCALE_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.scale")
+        .noDefaultValue()
+        .withDocumentation("New column's precision, used in decimal type");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_NEXT_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.next")
+        .defaultValue(HoodieRecord.HOODIE_IS_DELETED)
+        .withDocumentation("Column name which locate next to new column, `_hoodie_is_deleted` by default.");
+  }
+
+  public static final String BYTES = "BYTES";
+  public static final String STRING = "STRING";
+  public static final String INT = "INT";
+  public static final String LONG = "LONG";
+  public static final String FLOAT = "FLOAT";
+  public static final String DOUBLE = "DOUBLE";
+  public static final String BOOLEAN = "BOOLEAN";
+  public static final String DECIMAL = "DECIMAL";
+
+  @Override
+  public Schema processSchema(Schema schema) {
+    String newColumnName = this.config.getString(Config.SCHEMA_POST_PROCESSOR_ADD_COLUMN_NAME_PROP.key());
+
+    if (schema.getField(newColumnName) != null) {
+      LOG.warn(String.format("Column %s already exist!", newColumnName));
+      return schema;
+    }
+
+    List<Schema.Field> sourceFields = schema.getFields();
+    List<Schema.Field> targetFields = new ArrayList<>(sourceFields.size() + 1);
+
+    String nextColumnName = this.config.getString(Config.SCHEMA_POST_PROCESSOR_ADD_COLUMN_NEXT_PROP.key(),
+        Config.SCHEMA_POST_PROCESSOR_ADD_COLUMN_NEXT_PROP.defaultValue());
+
+    // mark whether the new column is added
+    boolean isAdded = false;
+    for (Schema.Field sourceField : sourceFields) {
+      if (sourceField.name().equals(nextColumnName)) {
+        targetFields.add(buildNewColumn());
+        isAdded = true;
+      }
+      targetFields.add(new Schema.Field(sourceField.name(), sourceField.schema(), sourceField.doc(), sourceField.defaultVal()));
+    }
+
+    // this would happen when `nextColumn` does not exist. just append the new column to the end
+    if (!isAdded) {
+      targetFields.add(buildNewColumn());
+    }
+
+    return Schema.createRecord(schema.getName(), schema.getDoc(), schema.getNamespace(), false, targetFields);
+  }
+
+  private Schema.Field buildNewColumn() {
+    Schema.Field result;
+
+    String columnName = this.config.getString(Config.SCHEMA_POST_PROCESSOR_ADD_COLUMN_NAME_PROP.key());
+    String type = this.config.getString(Config.SCHEMA_POST_PROCESSOR_ADD_COLUMN_TYPE_PROP.key()).toUpperCase(Locale.ROOT);
+    String doc = this.config.getString(Config.SCHEMA_POST_PROCESSOR_ADD_COLUMN_DOC_PROP.key(), null);
+    Object defaultValue = this.config.getOrDefault(Config.SCHEMA_POST_PROCESSOR_ADD_COLUMN_DEFAULT_PROP.key(),
+        null);
+
+    switch (type) {
+      case STRING:
+      case BYTES:
+      case INT:
+      case LONG:
+      case FLOAT:
+      case DOUBLE:
+      case BOOLEAN:

Review comment:
       so, looks like we are supporting only primitives here. I don't see arrays or maps etc. Can we call it out in the class documentation. would like to understand why we have such a limitation. why not add all diff types? 
   

##########
File path: hudi-utilities/src/main/java/org/apache/hudi/utilities/schema/AddColumnSchemaPostProcessor.java
##########
@@ -0,0 +1,172 @@
+/*
+ * 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.hudi.utilities.schema;
+
+import org.apache.hudi.common.config.ConfigProperty;
+import org.apache.hudi.common.config.TypedProperties;
+import org.apache.hudi.common.model.HoodieRecord;
+import org.apache.hudi.utilities.exception.HoodieSchemaPostProcessException;
+
+import org.apache.avro.LogicalTypes;
+import org.apache.avro.Schema;
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Logger;
+import org.apache.spark.api.java.JavaSparkContext;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+
+/**
+ * A {@link SchemaPostProcessor} use to add column to given schema. Currently. only supports adding one column at a time.
+ * Users can specify the position of new column by config {@link Config#SCHEMA_POST_PROCESSOR_ADD_COLUMN_NEXT_PROP},
+ * the new column will be added before this column.
+ * <p>
+ * Currently supported types : bytes, string, int, long, float, double, boolean, decimal
+ */
+public class AddColumnSchemaPostProcessor extends SchemaPostProcessor {
+
+  private static final Logger LOG = LogManager.getLogger(AddColumnSchemaPostProcessor.class);
+
+  public AddColumnSchemaPostProcessor(TypedProperties props, JavaSparkContext jssc) {
+    super(props, jssc);
+  }
+
+  /**
+   * Configs supported.
+   */
+  public static class Config {
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_NAME_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.name")
+        .noDefaultValue()
+        .withDocumentation("New column's name");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_TYPE_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.type")
+        .noDefaultValue()
+        .withDocumentation("New column's type");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_DOC_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.doc")
+        .noDefaultValue()
+        .withDocumentation("New column's doc");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_DEFAULT_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.default")
+        .noDefaultValue()
+        .withDocumentation("New column's default value");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_SIZE_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.size")
+        .noDefaultValue()
+        .withDocumentation("New column's size, used in decimal type");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_PRECISION_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.precision")
+        .noDefaultValue()
+        .withDocumentation("New column's precision, used in decimal type");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_SCALE_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.scale")
+        .noDefaultValue()
+        .withDocumentation("New column's precision, used in decimal type");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_NEXT_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.next")
+        .defaultValue(HoodieRecord.HOODIE_IS_DELETED)

Review comment:
       there should not be any default. We should just append to the end by defualt




-- 
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: commits-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] pratyakshsharma commented on a change in pull request #5031: [HUDI-3523] Introduce AddColumnSchemaPostProcessor to support add column to a given schema

Posted by GitBox <gi...@apache.org>.
pratyakshsharma commented on a change in pull request #5031:
URL: https://github.com/apache/hudi/pull/5031#discussion_r830484633



##########
File path: hudi-utilities/src/main/java/org/apache/hudi/utilities/schema/AddColumnSchemaPostProcessor.java
##########
@@ -0,0 +1,172 @@
+/*
+ * 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.hudi.utilities.schema;
+
+import org.apache.hudi.common.config.ConfigProperty;
+import org.apache.hudi.common.config.TypedProperties;
+import org.apache.hudi.common.model.HoodieRecord;
+import org.apache.hudi.utilities.exception.HoodieSchemaPostProcessException;
+
+import org.apache.avro.LogicalTypes;
+import org.apache.avro.Schema;
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Logger;
+import org.apache.spark.api.java.JavaSparkContext;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+
+/**
+ * A {@link SchemaPostProcessor} use to add column to given schema. Currently. only supports adding one column at a time.
+ * Users can specify the position of new column by config {@link Config#SCHEMA_POST_PROCESSOR_ADD_COLUMN_NEXT_PROP},
+ * the new column will be added before this column.
+ * <p>
+ * Currently supported types : bytes, string, int, long, float, double, boolean, decimal
+ */
+public class AddColumnSchemaPostProcessor extends SchemaPostProcessor {
+
+  private static final Logger LOG = LogManager.getLogger(AddColumnSchemaPostProcessor.class);
+
+  public AddColumnSchemaPostProcessor(TypedProperties props, JavaSparkContext jssc) {
+    super(props, jssc);
+  }
+
+  /**
+   * Configs supported.
+   */
+  public static class Config {
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_NAME_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.name")
+        .noDefaultValue()
+        .withDocumentation("New column's name");
+
+    public static final ConfigProperty<String> SCHEMA_POST_PROCESSOR_ADD_COLUMN_TYPE_PROP = ConfigProperty
+        .key("hoodie.deltastreamer.schemaprovider.schema_post_processor.add.column.type")
+        .noDefaultValue()
+        .withDocumentation("New column's type");

Review comment:
       can we add the supported types here in documentation as well?




-- 
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: commits-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] hudi-bot commented on pull request #5031: [HUDI-3523] Introduce AddColumnSchemaPostProcessor to support add column to a given schema

Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #5031:
URL: https://github.com/apache/hudi/pull/5031#issuecomment-1066429523


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "4b0f53f54af7d2762739a82df6b2bc2a8ddc899b",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6911",
       "triggerID" : "4b0f53f54af7d2762739a82df6b2bc2a8ddc899b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4b0f53f54af7d2762739a82df6b2bc2a8ddc899b Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6911) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] hudi-bot commented on pull request #5031: [HUDI-3523] Introduce AddColumnSchemaPostProcessor to support add column to a given schema

Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #5031:
URL: https://github.com/apache/hudi/pull/5031#issuecomment-1066465881


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "4b0f53f54af7d2762739a82df6b2bc2a8ddc899b",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6911",
       "triggerID" : "4b0f53f54af7d2762739a82df6b2bc2a8ddc899b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ef59e8cc44406e42c05ee5c538753f6656aa8bd0",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6914",
       "triggerID" : "ef59e8cc44406e42c05ee5c538753f6656aa8bd0",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4b0f53f54af7d2762739a82df6b2bc2a8ddc899b Azure: [CANCELED](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6911) 
   * ef59e8cc44406e42c05ee5c538753f6656aa8bd0 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6914) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] hudi-bot removed a comment on pull request #5031: [HUDI-3523] Introduce AddColumnSchemaPostProcessor to support add column to a given schema

Posted by GitBox <gi...@apache.org>.
hudi-bot removed a comment on pull request #5031:
URL: https://github.com/apache/hudi/pull/5031#issuecomment-1066428073


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "4b0f53f54af7d2762739a82df6b2bc2a8ddc899b",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "4b0f53f54af7d2762739a82df6b2bc2a8ddc899b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4b0f53f54af7d2762739a82df6b2bc2a8ddc899b UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] hudi-bot removed a comment on pull request #5031: [HUDI-3523] Introduce AddColumnSchemaPostProcessor to support add column to a given schema

Posted by GitBox <gi...@apache.org>.
hudi-bot removed a comment on pull request #5031:
URL: https://github.com/apache/hudi/pull/5031#issuecomment-1066464076


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "4b0f53f54af7d2762739a82df6b2bc2a8ddc899b",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6911",
       "triggerID" : "4b0f53f54af7d2762739a82df6b2bc2a8ddc899b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ef59e8cc44406e42c05ee5c538753f6656aa8bd0",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "ef59e8cc44406e42c05ee5c538753f6656aa8bd0",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4b0f53f54af7d2762739a82df6b2bc2a8ddc899b Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6911) 
   * ef59e8cc44406e42c05ee5c538753f6656aa8bd0 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] hudi-bot commented on pull request #5031: [HUDI-3523] Introduce AddColumnSchemaPostProcessor to support add column to a given schema

Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #5031:
URL: https://github.com/apache/hudi/pull/5031#issuecomment-1066560588


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "4b0f53f54af7d2762739a82df6b2bc2a8ddc899b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6911",
       "triggerID" : "4b0f53f54af7d2762739a82df6b2bc2a8ddc899b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ef59e8cc44406e42c05ee5c538753f6656aa8bd0",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6914",
       "triggerID" : "ef59e8cc44406e42c05ee5c538753f6656aa8bd0",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * ef59e8cc44406e42c05ee5c538753f6656aa8bd0 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6914) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] hudi-bot commented on pull request #5031: [HUDI-3523] Introduce AddColumnSchemaPostProcessor to support add column to a given schema

Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #5031:
URL: https://github.com/apache/hudi/pull/5031#issuecomment-1067662681


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "4b0f53f54af7d2762739a82df6b2bc2a8ddc899b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6911",
       "triggerID" : "4b0f53f54af7d2762739a82df6b2bc2a8ddc899b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ef59e8cc44406e42c05ee5c538753f6656aa8bd0",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6914",
       "triggerID" : "ef59e8cc44406e42c05ee5c538753f6656aa8bd0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ef59e8cc44406e42c05ee5c538753f6656aa8bd0",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6957",
       "triggerID" : "1067661400",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * ef59e8cc44406e42c05ee5c538753f6656aa8bd0 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6914) Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=6957) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

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