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-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org