You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by me...@apache.org on 2023/03/06 11:29:25 UTC

[hudi] branch master updated: Fix some comments on schema change (#8084)

This is an automated email from the ASF dual-hosted git repository.

mengtao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hudi.git


The following commit(s) were added to refs/heads/master by this push:
     new dcedf139d32 Fix some comments on schema change (#8084)
dcedf139d32 is described below

commit dcedf139d32b681ef196df279f93da5c01fc5d61
Author: mwish <15...@qq.com>
AuthorDate: Mon Mar 6 19:29:18 2023 +0800

    Fix some comments on schema change (#8084)
---
 .../org/apache/hudi/client/utils/SparkInternalSchemaConverter.java  | 4 ++--
 .../org/apache/hudi/internal/schema/utils/SchemaChangeUtils.java    | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/client/utils/SparkInternalSchemaConverter.java b/hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/client/utils/SparkInternalSchemaConverter.java
index 198b097134b..2b14bb3a066 100644
--- a/hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/client/utils/SparkInternalSchemaConverter.java
+++ b/hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/client/utils/SparkInternalSchemaConverter.java
@@ -287,7 +287,7 @@ public class SparkInternalSchemaConverter {
 
   /**
    * Convert Int/long type to other Type.
-   * Now only support int/long -> long/float/double/string
+   * Now only support int/long -> long/float/double/string/Decimal
    * TODO: support more types
    */
   private static boolean convertIntLongType(WritableColumnVector oldV, WritableColumnVector newV, DataType newType, int len) {
@@ -321,7 +321,7 @@ public class SparkInternalSchemaConverter {
 
   /**
    * Convert float type to other Type.
-   * Now only support float -> double/String
+   * Now only support float -> double/String/Decimal
    * TODO: support more types
    */
   private static boolean convertFloatType(WritableColumnVector oldV, WritableColumnVector newV, DataType newType, int len) {
diff --git a/hudi-common/src/main/java/org/apache/hudi/internal/schema/utils/SchemaChangeUtils.java b/hudi-common/src/main/java/org/apache/hudi/internal/schema/utils/SchemaChangeUtils.java
index f768830737c..ff2ca89e98e 100644
--- a/hudi-common/src/main/java/org/apache/hudi/internal/schema/utils/SchemaChangeUtils.java
+++ b/hudi-common/src/main/java/org/apache/hudi/internal/schema/utils/SchemaChangeUtils.java
@@ -38,9 +38,9 @@ public class SchemaChangeUtils {
   /**
    * Whether to allow the column type to be updated.
    * now only support:
-   * int => long/float/double/string
-   * long => float/double/string
-   * float => double/String
+   * int => long/float/double/String/Decimal
+   * long => float/double/String/Decimal
+   * float => double/String/Decimal
    * double => String/Decimal
    * Decimal => Decimal/String
    * String => date/decimal