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/01/13 12:27:57 UTC

[GitHub] [hudi] xiaotianzhang01 opened a new pull request #4589: [MINOR] Fix the check condition in the readFromVector method to alway…

xiaotianzhang01 opened a new pull request #4589:
URL: https://github.com/apache/hudi/pull/4589


   …s be true
   
   ## *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
   
   `if (stringType == null || !stringType.equals(StringType.String)) {`  
   This condition, one is an enumeration type and the other is a string type, the result is always true
   
   ## 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:
   
   
   ## 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 commented on pull request #4589: [MINOR] Fix the check condition in the readFromVector method to alway…

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5197",
       "triggerID" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 1141cc55e5e354d5671f9d7e894b2fd85a8aa1de Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5197) 
   
   <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] danny0405 commented on a change in pull request #4589: [MINOR] Fix the check condition in the `readFromVector` method to alway true

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



##########
File path: hudi-common/src/main/java/org/apache/hudi/common/util/AvroOrcUtils.java
##########
@@ -511,8 +511,8 @@ public static Object readFromVector(TypeDescription type, ColumnVector colVector
           throw new HoodieIOException("CHAR/VARCHAR has length " + result.length() + " greater than Max Length allowed");
         }
       case STRING:
-        String stringType = avroSchema.getProp(GenericData.STRING_PROP);
-        if (stringType == null || !stringType.equals(StringType.String)) {
+        String stringType = avroSchema != null ? avroSchema.getProp(GenericData.STRING_PROP) : null;
+        if (!StringType.String.name().equals(stringType)) {
           int stringLength = ((BytesColumnVector) colVector).length[vectorPos];

Review comment:
       What about `stringType == null || !StringType.String.name().equals(stringType)` ?




-- 
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 #4589: [MINOR] Fix the check condition in the `readFromVector` method to alway true

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5197",
       "triggerID" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5211",
       "triggerID" : "1012682869",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "9694d86642166e74f603cf2a7a5cc38ae2204f20",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5228",
       "triggerID" : "9694d86642166e74f603cf2a7a5cc38ae2204f20",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1de24e856bc522a6f4e94bdaf0038d0bf1e2874a",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5276",
       "triggerID" : "1de24e856bc522a6f4e94bdaf0038d0bf1e2874a",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9694d86642166e74f603cf2a7a5cc38ae2204f20 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5228) 
   * 1de24e856bc522a6f4e94bdaf0038d0bf1e2874a Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5276) 
   
   <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] xiaotianzhang01 commented on a change in pull request #4589: [MINOR] Fix the check condition in the `readFromVector` method to alway true

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



##########
File path: hudi-common/src/main/java/org/apache/hudi/common/util/AvroOrcUtils.java
##########
@@ -511,8 +511,8 @@ public static Object readFromVector(TypeDescription type, ColumnVector colVector
           throw new HoodieIOException("CHAR/VARCHAR has length " + result.length() + " greater than Max Length allowed");
         }
       case STRING:
-        String stringType = avroSchema.getProp(GenericData.STRING_PROP);
-        if (stringType == null || !stringType.equals(StringType.String)) {
+        String stringType = avroSchema != null ? avroSchema.getProp(GenericData.STRING_PROP) : null;
+        if (!StringType.String.name().equals(stringType)) {
           int stringLength = ((BytesColumnVector) colVector).length[vectorPos];

Review comment:
       Check if user set type as string, default is utf8 type. 
   ```
     public enum StringType { CharSequence, String, Utf8 };
     ...
     public static final String STRING_PROP = "avro.java.string";
     protected static final String STRING_TYPE_STRING = "String";
     ...
     s.addProp(GenericData.STRING_PROP, GenericData.STRING_TYPE_STRING);
   ```
   `StringType.String` is an enumeration type, but `stringType` is of type String. 




-- 
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] xiaotianzhang01 commented on a change in pull request #4589: [MINOR] Fix the check condition in the `readFromVector` method to alway true

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



##########
File path: hudi-common/src/main/java/org/apache/hudi/common/util/AvroOrcUtils.java
##########
@@ -511,8 +511,8 @@ public static Object readFromVector(TypeDescription type, ColumnVector colVector
           throw new HoodieIOException("CHAR/VARCHAR has length " + result.length() + " greater than Max Length allowed");
         }
       case STRING:
-        String stringType = avroSchema.getProp(GenericData.STRING_PROP);
-        if (stringType == null || !stringType.equals(StringType.String)) {
+        String stringType = avroSchema != null ? avroSchema.getProp(GenericData.STRING_PROP) : null;
+        if (!StringType.String.name().equals(stringType)) {
           int stringLength = ((BytesColumnVector) colVector).length[vectorPos];

Review comment:
       This condition is to check if the user has set the type to string, the default is utf8 type. But `stringType` is `String` type and `StringType.String` is enum type. Below is the relevant code:
   ```
     public enum StringType { CharSequence, String, Utf8 };
   
     public static final String STRING_PROP = "avro.java.string";
     protected static final String STRING_TYPE_STRING = "String";
   
    ...
    s.addProp(GenericData.STRING_PROP, GenericData.STRING_TYPE_STRING);
   ```




-- 
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 #4589: [MINOR] Fix the check condition in the `readFromVector` method to alway true

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5197",
       "triggerID" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5211",
       "triggerID" : "1012682869",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "9694d86642166e74f603cf2a7a5cc38ae2204f20",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "9694d86642166e74f603cf2a7a5cc38ae2204f20",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 1141cc55e5e354d5671f9d7e894b2fd85a8aa1de Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5197) Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5211) 
   * 9694d86642166e74f603cf2a7a5cc38ae2204f20 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 #4589: [MINOR] Fix the check condition in the `readFromVector` method to alway true

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5197",
       "triggerID" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5211",
       "triggerID" : "1012682869",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "9694d86642166e74f603cf2a7a5cc38ae2204f20",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5228",
       "triggerID" : "9694d86642166e74f603cf2a7a5cc38ae2204f20",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9694d86642166e74f603cf2a7a5cc38ae2204f20 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5228) 
   
   <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] xiaotianzhang01 commented on a change in pull request #4589: [MINOR] Fix the check condition in the `readFromVector` method to alway true

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



##########
File path: hudi-common/src/main/java/org/apache/hudi/common/util/AvroOrcUtils.java
##########
@@ -511,8 +511,8 @@ public static Object readFromVector(TypeDescription type, ColumnVector colVector
           throw new HoodieIOException("CHAR/VARCHAR has length " + result.length() + " greater than Max Length allowed");
         }
       case STRING:
-        String stringType = avroSchema.getProp(GenericData.STRING_PROP);
-        if (stringType == null || !stringType.equals(StringType.String)) {
+        String stringType = avroSchema != null ? avroSchema.getProp(GenericData.STRING_PROP) : null;
+        if (!StringType.String.name().equals(stringType)) {
           int stringLength = ((BytesColumnVector) colVector).length[vectorPos];

Review comment:
       If `stringType` is null then it will not be equal to `StringType.String.name()`




-- 
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 #4589: [MINOR] Fix the check condition in the `readFromVector` method to alway true

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5197",
       "triggerID" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 1141cc55e5e354d5671f9d7e894b2fd85a8aa1de Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5197) 
   
   <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] danny0405 commented on a change in pull request #4589: [MINOR] Fix the check condition in the `readFromVector` method to alway true

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



##########
File path: hudi-common/src/main/java/org/apache/hudi/common/util/AvroOrcUtils.java
##########
@@ -511,8 +511,8 @@ public static Object readFromVector(TypeDescription type, ColumnVector colVector
           throw new HoodieIOException("CHAR/VARCHAR has length " + result.length() + " greater than Max Length allowed");
         }
       case STRING:
-        String stringType = avroSchema.getProp(GenericData.STRING_PROP);
-        if (stringType == null || !stringType.equals(StringType.String)) {
+        String stringType = avroSchema != null ? avroSchema.getProp(GenericData.STRING_PROP) : null;
+        if (!StringType.String.name().equals(stringType)) {
           int stringLength = ((BytesColumnVector) colVector).length[vectorPos];

Review comment:
       Then `stringType == null || !StringType.String.name().equals(stringType)` should work as expected ~




-- 
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] xiaotianzhang01 commented on a change in pull request #4589: [MINOR] Fix the check condition in the `readFromVector` method to alway true

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



##########
File path: hudi-common/src/main/java/org/apache/hudi/common/util/AvroOrcUtils.java
##########
@@ -521,9 +522,6 @@ public static Object readFromVector(TypeDescription type, ColumnVector colVector
         } else {
           return ((BytesColumnVector) colVector).toString(vectorPos);
         }
-      case DATE:
-        // convert to daysSinceEpoch for LogicalType.Date

Review comment:
       Sorry, I think it's still a single PR focus feature fix, so I'll
   Cancel changes here.




-- 
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 #4589: [MINOR] Fix the check condition in the `readFromVector` method to alway true

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5197",
       "triggerID" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5211",
       "triggerID" : "1012682869",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "9694d86642166e74f603cf2a7a5cc38ae2204f20",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5228",
       "triggerID" : "9694d86642166e74f603cf2a7a5cc38ae2204f20",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 1141cc55e5e354d5671f9d7e894b2fd85a8aa1de Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5197) Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5211) 
   * 9694d86642166e74f603cf2a7a5cc38ae2204f20 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5228) 
   
   <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 #4589: [MINOR] Fix the check condition in the `readFromVector` method to alway true

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5197",
       "triggerID" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5211",
       "triggerID" : "1012682869",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * 1141cc55e5e354d5671f9d7e894b2fd85a8aa1de Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5197) Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5211) 
   
   <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] xiaotianzhang01 commented on a change in pull request #4589: [MINOR] Fix the check condition in the `readFromVector` method to alway true

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



##########
File path: hudi-common/src/main/java/org/apache/hudi/common/util/AvroOrcUtils.java
##########
@@ -521,9 +522,6 @@ public static Object readFromVector(TypeDescription type, ColumnVector colVector
         } else {
           return ((BytesColumnVector) colVector).toString(vectorPos);
         }
-      case DATE:
-        // convert to daysSinceEpoch for LogicalType.Date

Review comment:
       done




-- 
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] xiaotianzhang01 commented on a change in pull request #4589: [MINOR] Fix the check condition in the `readFromVector` method to alway true

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



##########
File path: hudi-common/src/main/java/org/apache/hudi/common/util/AvroOrcUtils.java
##########
@@ -511,8 +511,8 @@ public static Object readFromVector(TypeDescription type, ColumnVector colVector
           throw new HoodieIOException("CHAR/VARCHAR has length " + result.length() + " greater than Max Length allowed");
         }
       case STRING:
-        String stringType = avroSchema.getProp(GenericData.STRING_PROP);
-        if (stringType == null || !stringType.equals(StringType.String)) {
+        String stringType = avroSchema != null ? avroSchema.getProp(GenericData.STRING_PROP) : null;
+        if (!StringType.String.name().equals(stringType)) {
           int stringLength = ((BytesColumnVector) colVector).length[vectorPos];

Review comment:
       This condition is to check if the user has set the type to string, the default is utf8 type. But `stringType` is `String` type and `StringType.String` is `enum` type, `!stringType.equals(StringType.String)` is always true. Below is the relevant code:
   ```
     public enum StringType { CharSequence, String, Utf8 };
   
     public static final String STRING_PROP = "avro.java.string";
     protected static final String STRING_TYPE_STRING = "String";
   
    ...
    s.addProp(GenericData.STRING_PROP, GenericData.STRING_TYPE_STRING);
   ```




-- 
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 #4589: [MINOR] Fix the check condition in the `readFromVector` method to alway true

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5197",
       "triggerID" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5211",
       "triggerID" : "1012682869",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "9694d86642166e74f603cf2a7a5cc38ae2204f20",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5228",
       "triggerID" : "9694d86642166e74f603cf2a7a5cc38ae2204f20",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1de24e856bc522a6f4e94bdaf0038d0bf1e2874a",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5276",
       "triggerID" : "1de24e856bc522a6f4e94bdaf0038d0bf1e2874a",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 1de24e856bc522a6f4e94bdaf0038d0bf1e2874a Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5276) 
   
   <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 #4589: [MINOR] Fix the check condition in the `readFromVector` method to alway true

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5197",
       "triggerID" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5211",
       "triggerID" : "1012682869",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "9694d86642166e74f603cf2a7a5cc38ae2204f20",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5228",
       "triggerID" : "9694d86642166e74f603cf2a7a5cc38ae2204f20",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1de24e856bc522a6f4e94bdaf0038d0bf1e2874a",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "1de24e856bc522a6f4e94bdaf0038d0bf1e2874a",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9694d86642166e74f603cf2a7a5cc38ae2204f20 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5228) 
   * 1de24e856bc522a6f4e94bdaf0038d0bf1e2874a 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 #4589: [MINOR] Fix the check condition in the `readFromVector` method to alway true

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5197",
       "triggerID" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 1141cc55e5e354d5671f9d7e894b2fd85a8aa1de Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5197) 
   
   <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 #4589: [MINOR] Fix the check condition in the `readFromVector` method to alway true

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5197",
       "triggerID" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5211",
       "triggerID" : "1012682869",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * 1141cc55e5e354d5671f9d7e894b2fd85a8aa1de Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5197) Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5211) 
   
   <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 #4589: [MINOR] Fix the check condition in the `readFromVector` method to alway true

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5197",
       "triggerID" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5211",
       "triggerID" : "1012682869",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * 1141cc55e5e354d5671f9d7e894b2fd85a8aa1de Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5197) Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5211) 
   
   <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] danny0405 commented on a change in pull request #4589: [MINOR] Fix the check condition in the `readFromVector` method to alway true

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



##########
File path: hudi-common/src/main/java/org/apache/hudi/common/util/AvroOrcUtils.java
##########
@@ -511,8 +511,8 @@ public static Object readFromVector(TypeDescription type, ColumnVector colVector
           throw new HoodieIOException("CHAR/VARCHAR has length " + result.length() + " greater than Max Length allowed");
         }
       case STRING:
-        String stringType = avroSchema.getProp(GenericData.STRING_PROP);
-        if (stringType == null || !stringType.equals(StringType.String)) {
+        String stringType = avroSchema != null ? avroSchema.getProp(GenericData.STRING_PROP) : null;
+        if (!StringType.String.name().equals(stringType)) {
           int stringLength = ((BytesColumnVector) colVector).length[vectorPos];

Review comment:
       So, the original code `stringType == null` returns true and the new code also returns true, what's the difference here ?




-- 
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 pull request #4589: [MINOR] Fix the check condition in the `readFromVector` method to alway true

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


   Can we please file a jira. I see lot of discussions going on. So, may not be trivial. 


-- 
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 #4589: [MINOR] Fix the check condition in the `readFromVector` method to alway true

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5197",
       "triggerID" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5211",
       "triggerID" : "1012682869",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "9694d86642166e74f603cf2a7a5cc38ae2204f20",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5228",
       "triggerID" : "9694d86642166e74f603cf2a7a5cc38ae2204f20",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1de24e856bc522a6f4e94bdaf0038d0bf1e2874a",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5276",
       "triggerID" : "1de24e856bc522a6f4e94bdaf0038d0bf1e2874a",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9694d86642166e74f603cf2a7a5cc38ae2204f20 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5228) 
   * 1de24e856bc522a6f4e94bdaf0038d0bf1e2874a Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5276) 
   
   <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] xiaotianzhang01 commented on a change in pull request #4589: [MINOR] Fix the check condition in the `readFromVector` method to alway true

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



##########
File path: hudi-common/src/main/java/org/apache/hudi/common/util/AvroOrcUtils.java
##########
@@ -521,9 +522,6 @@ public static Object readFromVector(TypeDescription type, ColumnVector colVector
         } else {
           return ((BytesColumnVector) colVector).toString(vectorPos);
         }
-      case DATE:
-        // convert to daysSinceEpoch for LogicalType.Date

Review comment:
       Sorry, I think it's still a single PR focus feature fix, so I'll cancel changes here.




-- 
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 #4589: [MINOR] Fix the check condition in the `readFromVector` method to alway true

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5197",
       "triggerID" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5211",
       "triggerID" : "1012682869",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "9694d86642166e74f603cf2a7a5cc38ae2204f20",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5228",
       "triggerID" : "9694d86642166e74f603cf2a7a5cc38ae2204f20",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9694d86642166e74f603cf2a7a5cc38ae2204f20 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5228) 
   
   <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 #4589: [MINOR] Fix the check condition in the readFromVector method to alway…

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 1141cc55e5e354d5671f9d7e894b2fd85a8aa1de 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] xiaotianzhang01 commented on pull request #4589: [MINOR] Fix the check condition in the readFromVector method to alway…

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


   CC: @jintaoguan @danny0405 @vinothchandar


-- 
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 #4589: [MINOR] Fix the check condition in the readFromVector method to alway…

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 1141cc55e5e354d5671f9d7e894b2fd85a8aa1de 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] xiaotianzhang01 commented on a change in pull request #4589: [MINOR] Fix the check condition in the `readFromVector` method to alway true

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



##########
File path: hudi-common/src/main/java/org/apache/hudi/common/util/AvroOrcUtils.java
##########
@@ -521,9 +522,6 @@ public static Object readFromVector(TypeDescription type, ColumnVector colVector
         } else {
           return ((BytesColumnVector) colVector).toString(vectorPos);
         }
-      case DATE:
-        // convert to daysSinceEpoch for LogicalType.Date

Review comment:
       The modification here is to clean up the code by merging the return value with the same case




-- 
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 #4589: [MINOR] Fix the check condition in the `readFromVector` method to alway true

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5197",
       "triggerID" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5211",
       "triggerID" : "1012682869",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * 1141cc55e5e354d5671f9d7e894b2fd85a8aa1de Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5197) Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5211) 
   
   <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] xiaotianzhang01 commented on a change in pull request #4589: [MINOR] Fix the check condition in the `readFromVector` method to alway true

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



##########
File path: hudi-common/src/main/java/org/apache/hudi/common/util/AvroOrcUtils.java
##########
@@ -511,8 +511,8 @@ public static Object readFromVector(TypeDescription type, ColumnVector colVector
           throw new HoodieIOException("CHAR/VARCHAR has length " + result.length() + " greater than Max Length allowed");
         }
       case STRING:
-        String stringType = avroSchema.getProp(GenericData.STRING_PROP);
-        if (stringType == null || !stringType.equals(StringType.String)) {
+        String stringType = avroSchema != null ? avroSchema.getProp(GenericData.STRING_PROP) : null;
+        if (!StringType.String.name().equals(stringType)) {
           int stringLength = ((BytesColumnVector) colVector).length[vectorPos];

Review comment:
       `if (stringType == null || !StringType.String.name().equals(stringType))` should be equivalent to `!StringType.String.name().equals(stringType)`




-- 
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] xiaotianzhang01 commented on pull request #4589: [MINOR] Fix the check condition in the `readFromVector` method to alway true

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


   @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 commented on pull request #4589: [MINOR] Fix the check condition in the `readFromVector` method to alway true

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5197",
       "triggerID" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5211",
       "triggerID" : "1012682869",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "9694d86642166e74f603cf2a7a5cc38ae2204f20",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5228",
       "triggerID" : "9694d86642166e74f603cf2a7a5cc38ae2204f20",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1de24e856bc522a6f4e94bdaf0038d0bf1e2874a",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "1de24e856bc522a6f4e94bdaf0038d0bf1e2874a",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9694d86642166e74f603cf2a7a5cc38ae2204f20 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5228) 
   * 1de24e856bc522a6f4e94bdaf0038d0bf1e2874a 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] danny0405 commented on a change in pull request #4589: [MINOR] Fix the check condition in the `readFromVector` method to alway true

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



##########
File path: hudi-common/src/main/java/org/apache/hudi/common/util/AvroOrcUtils.java
##########
@@ -521,9 +522,6 @@ public static Object readFromVector(TypeDescription type, ColumnVector colVector
         } else {
           return ((BytesColumnVector) colVector).toString(vectorPos);
         }
-      case DATE:
-        // convert to daysSinceEpoch for LogicalType.Date

Review comment:
       Not sure what this patch fixed for ? Do you want to fix the NPE here ?




-- 
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 #4589: [MINOR] Fix the check condition in the `readFromVector` method to alway true

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5197",
       "triggerID" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5211",
       "triggerID" : "1012682869",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "9694d86642166e74f603cf2a7a5cc38ae2204f20",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "9694d86642166e74f603cf2a7a5cc38ae2204f20",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 1141cc55e5e354d5671f9d7e894b2fd85a8aa1de Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5197) Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5211) 
   * 9694d86642166e74f603cf2a7a5cc38ae2204f20 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 #4589: [MINOR] Fix the check condition in the `readFromVector` method to alway true

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5197",
       "triggerID" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "triggerType" : "PUSH"
     }, {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5211",
       "triggerID" : "1012682869",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "9694d86642166e74f603cf2a7a5cc38ae2204f20",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5228",
       "triggerID" : "9694d86642166e74f603cf2a7a5cc38ae2204f20",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 1141cc55e5e354d5671f9d7e894b2fd85a8aa1de Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5197) Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5211) 
   * 9694d86642166e74f603cf2a7a5cc38ae2204f20 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5228) 
   
   <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] danny0405 commented on a change in pull request #4589: [MINOR] Fix the check condition in the `readFromVector` method to alway true

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



##########
File path: hudi-common/src/main/java/org/apache/hudi/common/util/AvroOrcUtils.java
##########
@@ -521,9 +522,6 @@ public static Object readFromVector(TypeDescription type, ColumnVector colVector
         } else {
           return ((BytesColumnVector) colVector).toString(vectorPos);
         }
-      case DATE:
-        // convert to daysSinceEpoch for LogicalType.Date

Review comment:
       Still confused about what you are fixing for :(




-- 
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 #4589: [MINOR] Fix the check condition in the `readFromVector` method to alway true

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5197",
       "triggerID" : "1141cc55e5e354d5671f9d7e894b2fd85a8aa1de",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 1141cc55e5e354d5671f9d7e894b2fd85a8aa1de Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5197) 
   
   <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