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 30175e992ef [MINOR] schema evolution  relax decimal type conversion 
conditions (#8063)
30175e992ef is described below

commit 30175e992ef68592f574fc90ccf415623a29827d
Author: watermelon12138 <[email protected]>
AuthorDate: Tue Feb 28 09:25:17 2023 +0800

    [MINOR] schema evolution  relax decimal type conversion conditions (#8063)
---
 .../java/org/apache/hudi/internal/schema/utils/SchemaChangeUtils.java  | 3 +++
 1 file changed, 3 insertions(+)

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 290e3489a3e..f768830737c 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
@@ -77,6 +77,9 @@ public class SchemaChangeUtils {
           if (decimalDsr.isWiderThan(decimalSrc)) {
             return true;
           }
+          if (decimalDsr.precision() >= decimalSrc.precision() && 
decimalDsr.scale() == decimalSrc.scale()) {
+            return true;
+          }
         } else if (dsr.typeId() == Type.TypeID.STRING) {
           return true;
         }

Reply via email to