You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "watermelon12138 (via GitHub)" <gi...@apache.org> on 2023/11/04 03:58:52 UTC

[PR] [MINOR] Fix npe for get internal schema [hudi]

watermelon12138 opened a new pull request, #9984:
URL: https://github.com/apache/hudi/pull/9984

   ### Change Logs
   
   get internal schema maybe meet  npe when parse avroSchema. So, we need to return InternalSchema.getEmptyInternalSchema() when avroSchema is null or empty.
   ### Impact
   
   no impact.
   
   ### Risk level (write none, low medium or high below)
   
   _If medium or high, explain what verification was done to mitigate the risks._
   
   ### Documentation Update
   
   _Describe any necessary documentation update if there is any new feature, config, or user-facing change_
   
   - _The config description must be updated if new configs are added or the default value of the configs are changed_
   - _Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the
     ticket number here and follow the [instruction](https://hudi.apache.org/contribute/developer-setup#website) to make
     changes to the website._
   
   ### Contributor's checklist
   
   - [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [ ] Change Logs and Impact were stated clearly
   - [ ] Adequate tests were added if applicable
   - [ ] CI passed
   


-- 
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


Re: [PR] [MINOR] Fix npe for get internal schema [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9984:
URL: https://github.com/apache/hudi/pull/9984#issuecomment-1801981503

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "23eb3d5bd578bffbd1165f7e178f391ce0056cb9",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "23eb3d5bd578bffbd1165f7e178f391ce0056cb9",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2fb3eb51c728c5d3a9bdd725e77006a5141cc36f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20703",
       "triggerID" : "1793404457",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "2fb3eb51c728c5d3a9bdd725e77006a5141cc36f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20703",
       "triggerID" : "2fb3eb51c728c5d3a9bdd725e77006a5141cc36f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "",
       "status" : "DELETED",
       "url" : "TBD",
       "triggerID" : "1793404457",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "2fb3eb51c728c5d3a9bdd725e77006a5141cc36f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20703",
       "triggerID" : "1800970902",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "2fb3eb51c728c5d3a9bdd725e77006a5141cc36f",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "1801908644",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * 23eb3d5bd578bffbd1165f7e178f391ce0056cb9 UNKNOWN
   * 2fb3eb51c728c5d3a9bdd725e77006a5141cc36f Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20703) 
   
   <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


Re: [PR] [MINOR] Fix npe for get internal schema [hudi]

Posted by "watermelon12138 (via GitHub)" <gi...@apache.org>.
watermelon12138 commented on code in PR #9984:
URL: https://github.com/apache/hudi/pull/9984#discussion_r1384892385


##########
hudi-common/src/main/java/org/apache/hudi/common/util/InternalSchemaCache.java:
##########
@@ -217,7 +217,11 @@ public static InternalSchema getInternalSchemaByVersionId(long versionId, String
     }
     InternalSchema fileSchema = InternalSchemaUtils.searchSchema(versionId, SerDeHelper.parseSchemas(latestHistorySchema));
     // step3:
-    return fileSchema.isEmptySchema() ? AvroInternalSchemaConverter.convert(HoodieAvroUtils.addMetadataFields(new Schema.Parser().parse(avroSchema))) : fileSchema;
+    return fileSchema.isEmptySchema()
+           ? (StringUtils.isNullOrEmpty(avroSchema)
+             ? InternalSchema.getEmptyInternalSchema()
+             : AvroInternalSchemaConverter.convert(HoodieAvroUtils.addMetadataFields(new Schema.Parser().parse(avroSchema))))
+           : fileSchema;

Review Comment:
   @xiarixiaoyao Hi, This problem is difficult to reproduce. I think that we can try to prevent it from the code perspective. 



-- 
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


Re: [PR] [MINOR] Fix npe for get internal schema [hudi]

Posted by "watermelon12138 (via GitHub)" <gi...@apache.org>.
watermelon12138 commented on code in PR #9984:
URL: https://github.com/apache/hudi/pull/9984#discussion_r1385921027


##########
hudi-common/src/main/java/org/apache/hudi/common/util/InternalSchemaCache.java:
##########
@@ -217,7 +217,11 @@ public static InternalSchema getInternalSchemaByVersionId(long versionId, String
     }
     InternalSchema fileSchema = InternalSchemaUtils.searchSchema(versionId, SerDeHelper.parseSchemas(latestHistorySchema));
     // step3:
-    return fileSchema.isEmptySchema() ? AvroInternalSchemaConverter.convert(HoodieAvroUtils.addMetadataFields(new Schema.Parser().parse(avroSchema))) : fileSchema;
+    return fileSchema.isEmptySchema()
+            ? StringUtils.isNullOrEmpty(avroSchema)
+              ? InternalSchema.getEmptyInternalSchema()

Review Comment:
   @danny0405 Yes, Some users find this problem in the upgrade scenario(0.12.3 -> 0.14).



-- 
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


Re: [PR] [MINOR] Fix npe for get internal schema [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9984:
URL: https://github.com/apache/hudi/pull/9984#issuecomment-1799060682

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


Re: [PR] [MINOR] Fix npe for get internal schema [hudi]

Posted by "watermelon12138 (via GitHub)" <gi...@apache.org>.
watermelon12138 commented on code in PR #9984:
URL: https://github.com/apache/hudi/pull/9984#discussion_r1384889356


##########
hudi-common/src/main/java/org/apache/hudi/common/util/InternalSchemaCache.java:
##########
@@ -217,7 +217,11 @@ public static InternalSchema getInternalSchemaByVersionId(long versionId, String
     }
     InternalSchema fileSchema = InternalSchemaUtils.searchSchema(versionId, SerDeHelper.parseSchemas(latestHistorySchema));
     // step3:
-    return fileSchema.isEmptySchema() ? AvroInternalSchemaConverter.convert(HoodieAvroUtils.addMetadataFields(new Schema.Parser().parse(avroSchema))) : fileSchema;
+    return fileSchema.isEmptySchema()
+           ? (StringUtils.isNullOrEmpty(avroSchema)
+             ? InternalSchema.getEmptyInternalSchema()
+             : AvroInternalSchemaConverter.convert(HoodieAvroUtils.addMetadataFields(new Schema.Parser().parse(avroSchema))))
+           : fileSchema;

Review Comment:
   you can read the exception stack of this problem:
   
   Caused by: org.apache.avro.SchemaParseException: Cannot parse <null> schema
   	at org.apache.avro.Schema.parse(Schema.java:1633)
   	at org.apache.avro.Schema$Parser.parse(Schema.java:1430)
   	at org.apache.avro.Schema$Parser.parse(Schema.java:1418)
   	at org.apache.hudi.common.util.InternalSchemaCache.getInternalSchemaByVersionId(InternalSchemaCache.java:220)
   	at org.apache.hudi.common.util.InternalSchemaCache.getInternalSchemaByVersionId(InternalSchemaCache.java:226)
   	at org.apache.hudi.table.action.commit.HoodieMergeHelper.composeSchemaEvolutionTransformer(HoodieMergeHelper.java:177)
   	at org.apache.hudi.table.action.commit.HoodieMergeHelper.runMerge(HoodieMergeHelper.java:94)
   	at org.apache.hudi.table.HoodieSparkCopyOnWriteTable.handleUpdateInternal(HoodieSparkCopyOnWriteTable.java:252)
   	at org.apache.hudi.table.HoodieSparkCopyOnWriteTable.handleUpdate(HoodieSparkCopyOnWriteTable.java:235)
   	at org.apache.hudi.table.action.compact.CompactionExecutionHelper.writeFileAndGetWriteStats(CompactionExecutionHelper.java:64)
   	at org.apache.hudi.table.action.compact.HoodieCompactor.compact(HoodieCompactor.java:237)
   	at org.apache.hudi.table.action.compact.HoodieCompactor.lambda$compact$988df80a$1(HoodieCompactor.java:132)
   	at org.apache.spark.api.java.JavaPairRDD$.$anonfun$toScalaFunction$1(JavaPairRDD.scala:1070)
   	at scala.collection.Iterator$$anon$10.next(Iterator.scala:461)
   	at scala.collection.Iterator$$anon$11.nextCur(Iterator.scala:486)
   	at scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:492)
   	at org.apache.spark.storage.memory.MemoryStore.putIterator(MemoryStore.scala:223)
   	at org.apache.spark.storage.memory.MemoryStore.putIteratorAsBytes(MemoryStore.scala:352)
   	at org.apache.spark.storage.BlockManager.$anonfun$doPutIterator$1(BlockManager.scala:1498)
   	at org.apache.spark.storage.BlockManager.org$apache$spark$storage$BlockManager$$doPut(BlockManager.scala:1408)
   	at org.apache.spark.storage.BlockManager.doPutIterator(BlockManager.scala:1472)
   	at org.apache.spark.storage.BlockManager.getOrElseUpdate(BlockManager.scala:1295)
   	at org.apache.spark.rdd.RDD.getOrCompute(RDD.scala:384)
   	at org.apache.spark.rdd.RDD.iterator(RDD.scala:335)
   	at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
   	at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:373)
   	at org.apache.spark.rdd.RDD.iterator(RDD.scala:337)
   	at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:90)
   	at org.apache.spark.scheduler.Task.run(Task.scala:133)
   	at org.apache.spark.executor.Executor$TaskRunner.$anonfun$run$3(Executor.scala:506)
   	at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1474)
   	at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:509)
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   	at java.lang.Thread.run(Thread.java:750)



-- 
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


Re: [PR] [MINOR] Fix npe for get internal schema [hudi]

Posted by "zyclove (via GitHub)" <gi...@apache.org>.
zyclove commented on PR #9984:
URL: https://github.com/apache/hudi/pull/9984#issuecomment-1809904940

   @danny0405 👍🏻 
   By the way,
   Will 0.14.1 be released again? Or should we release 1.0.0 directly? Can you update the official roadmap?
   
   


-- 
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


Re: [PR] [MINOR] Fix npe for get internal schema [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9984:
URL: https://github.com/apache/hudi/pull/9984#issuecomment-1801052829

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "23eb3d5bd578bffbd1165f7e178f391ce0056cb9",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "23eb3d5bd578bffbd1165f7e178f391ce0056cb9",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2fb3eb51c728c5d3a9bdd725e77006a5141cc36f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20703",
       "triggerID" : "1793404457",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "2fb3eb51c728c5d3a9bdd725e77006a5141cc36f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20703",
       "triggerID" : "2fb3eb51c728c5d3a9bdd725e77006a5141cc36f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "",
       "status" : "DELETED",
       "url" : "TBD",
       "triggerID" : "1793404457",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "2fb3eb51c728c5d3a9bdd725e77006a5141cc36f",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "1800970902",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * 23eb3d5bd578bffbd1165f7e178f391ce0056cb9 UNKNOWN
   * 2fb3eb51c728c5d3a9bdd725e77006a5141cc36f Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20703) 
   
   <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


Re: [PR] [MINOR] Fix npe for get internal schema [hudi]

Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on PR #9984:
URL: https://github.com/apache/hudi/pull/9984#issuecomment-1811648830

   @zyclove 1.0.0-beta is already under release process.


-- 
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


Re: [PR] [MINOR] Fix npe for get internal schema [hudi]

Posted by "watermelon12138 (via GitHub)" <gi...@apache.org>.
watermelon12138 commented on PR #9984:
URL: https://github.com/apache/hudi/pull/9984#issuecomment-1793333108

   @xiarixiaoyao 


-- 
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


Re: [PR] [MINOR] Fix npe for get internal schema [hudi]

Posted by "watermelon12138 (via GitHub)" <gi...@apache.org>.
watermelon12138 commented on PR #9984:
URL: https://github.com/apache/hudi/pull/9984#issuecomment-1800970902

   @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


Re: [PR] [MINOR] Fix npe for get internal schema [hudi]

Posted by "xiarixiaoyao (via GitHub)" <gi...@apache.org>.
xiarixiaoyao commented on code in PR #9984:
URL: https://github.com/apache/hudi/pull/9984#discussion_r1382534301


##########
hudi-common/src/main/java/org/apache/hudi/common/util/InternalSchemaCache.java:
##########
@@ -217,7 +217,11 @@ public static InternalSchema getInternalSchemaByVersionId(long versionId, String
     }
     InternalSchema fileSchema = InternalSchemaUtils.searchSchema(versionId, SerDeHelper.parseSchemas(latestHistorySchema));
     // step3:
-    return fileSchema.isEmptySchema() ? AvroInternalSchemaConverter.convert(HoodieAvroUtils.addMetadataFields(new Schema.Parser().parse(avroSchema))) : fileSchema;
+    return fileSchema.isEmptySchema()
+           ? (StringUtils.isNullOrEmpty(avroSchema)
+             ? InternalSchema.getEmptyInternalSchema()
+             : AvroInternalSchemaConverter.convert(HoodieAvroUtils.addMetadataFields(new Schema.Parser().parse(avroSchema))))
+           : fileSchema;

Review Comment:
   thanks for your fix.  
   why avro schema is null 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


Re: [PR] [MINOR] Fix npe for get internal schema [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9984:
URL: https://github.com/apache/hudi/pull/9984#issuecomment-1798529726

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "23eb3d5bd578bffbd1165f7e178f391ce0056cb9",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "23eb3d5bd578bffbd1165f7e178f391ce0056cb9",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2fb3eb51c728c5d3a9bdd725e77006a5141cc36f",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "1793404457",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "",
       "status" : "CANCELED",
       "url" : "TBD",
       "triggerID" : "1793404457",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "2fb3eb51c728c5d3a9bdd725e77006a5141cc36f",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "2fb3eb51c728c5d3a9bdd725e77006a5141cc36f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 23eb3d5bd578bffbd1165f7e178f391ce0056cb9 UNKNOWN
   *  Unknown: [CANCELED](TBD) 
   * 2fb3eb51c728c5d3a9bdd725e77006a5141cc36f 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


Re: [PR] [MINOR] Fix npe for get internal schema [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9984:
URL: https://github.com/apache/hudi/pull/9984#issuecomment-1798607147

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


Re: [PR] [MINOR] Fix npe for get internal schema [hudi]

Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on code in PR #9984:
URL: https://github.com/apache/hudi/pull/9984#discussion_r1385855432


##########
hudi-common/src/main/java/org/apache/hudi/common/util/InternalSchemaCache.java:
##########
@@ -217,7 +217,11 @@ public static InternalSchema getInternalSchemaByVersionId(long versionId, String
     }
     InternalSchema fileSchema = InternalSchemaUtils.searchSchema(versionId, SerDeHelper.parseSchemas(latestHistorySchema));
     // step3:
-    return fileSchema.isEmptySchema() ? AvroInternalSchemaConverter.convert(HoodieAvroUtils.addMetadataFields(new Schema.Parser().parse(avroSchema))) : fileSchema;
+    return fileSchema.isEmptySchema()
+            ? StringUtils.isNullOrEmpty(avroSchema)
+              ? InternalSchema.getEmptyInternalSchema()

Review Comment:
   Is it because the version upgrade or something? Is the null avro schema coming from an old version Hudi table?



-- 
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


Re: [PR] [MINOR] Fix npe for get internal schema [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9984:
URL: https://github.com/apache/hudi/pull/9984#issuecomment-1798508735

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "23eb3d5bd578bffbd1165f7e178f391ce0056cb9",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "23eb3d5bd578bffbd1165f7e178f391ce0056cb9",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 23eb3d5bd578bffbd1165f7e178f391ce0056cb9 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


Re: [PR] [MINOR] Fix npe for get internal schema [hudi]

Posted by "watermelon12138 (via GitHub)" <gi...@apache.org>.
watermelon12138 commented on PR #9984:
URL: https://github.com/apache/hudi/pull/9984#issuecomment-1808185428

   @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


Re: [PR] [MINOR] Fix npe for get internal schema [hudi]

Posted by "watermelon12138 (via GitHub)" <gi...@apache.org>.
watermelon12138 commented on PR #9984:
URL: https://github.com/apache/hudi/pull/9984#issuecomment-1793404457

   @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


Re: [PR] [MINOR] Fix npe for get internal schema [hudi]

Posted by "watermelon12138 (via GitHub)" <gi...@apache.org>.
watermelon12138 commented on PR #9984:
URL: https://github.com/apache/hudi/pull/9984#issuecomment-1801908644

   @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


Re: [PR] [MINOR] Fix npe for get internal schema [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9984:
URL: https://github.com/apache/hudi/pull/9984#issuecomment-1801060193

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "23eb3d5bd578bffbd1165f7e178f391ce0056cb9",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "23eb3d5bd578bffbd1165f7e178f391ce0056cb9",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2fb3eb51c728c5d3a9bdd725e77006a5141cc36f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20703",
       "triggerID" : "1793404457",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "2fb3eb51c728c5d3a9bdd725e77006a5141cc36f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20703",
       "triggerID" : "2fb3eb51c728c5d3a9bdd725e77006a5141cc36f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "",
       "status" : "DELETED",
       "url" : "TBD",
       "triggerID" : "1793404457",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "2fb3eb51c728c5d3a9bdd725e77006a5141cc36f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20703",
       "triggerID" : "1800970902",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * 23eb3d5bd578bffbd1165f7e178f391ce0056cb9 UNKNOWN
   * 2fb3eb51c728c5d3a9bdd725e77006a5141cc36f Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20703) 
   
   <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


Re: [PR] [MINOR] Fix npe for get internal schema [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #9984:
URL: https://github.com/apache/hudi/pull/9984#issuecomment-1801996056

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "23eb3d5bd578bffbd1165f7e178f391ce0056cb9",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "23eb3d5bd578bffbd1165f7e178f391ce0056cb9",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2fb3eb51c728c5d3a9bdd725e77006a5141cc36f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20703",
       "triggerID" : "1793404457",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "2fb3eb51c728c5d3a9bdd725e77006a5141cc36f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20703",
       "triggerID" : "2fb3eb51c728c5d3a9bdd725e77006a5141cc36f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "",
       "status" : "DELETED",
       "url" : "TBD",
       "triggerID" : "1793404457",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "2fb3eb51c728c5d3a9bdd725e77006a5141cc36f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20703",
       "triggerID" : "1800970902",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "2fb3eb51c728c5d3a9bdd725e77006a5141cc36f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20703",
       "triggerID" : "1801908644",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * 23eb3d5bd578bffbd1165f7e178f391ce0056cb9 UNKNOWN
   * 2fb3eb51c728c5d3a9bdd725e77006a5141cc36f Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20703) 
   
   <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


Re: [PR] [MINOR] Fix npe for get internal schema [hudi]

Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 merged PR #9984:
URL: https://github.com/apache/hudi/pull/9984


-- 
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