You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "voonhous (via GitHub)" <gi...@apache.org> on 2023/09/21 02:46:47 UTC
[GitHub] [hudi] voonhous commented on a diff in pull request #9752: [HUDI-6877] Fix avro read issue after ALTER TABLE RENAME DDL on Spark3_1
voonhous commented on code in PR #9752:
URL: https://github.com/apache/hudi/pull/9752#discussion_r1332380352
##########
hudi-common/src/main/java/org/apache/hudi/common/table/log/block/HoodieDataBlock.java:
##########
@@ -115,6 +114,35 @@ public byte[] getContentBytes() throws IOException {
return serializeRecords(records.get());
}
+ private Schema getReaderSchema(Option<Schema> readerSchemaOpt) {
+ Schema writerSchema = getWriterSchema(super.getLogBlockHeader());
+ // If no reader-schema has been provided assume writer-schema as one
+ if (!readerSchemaOpt.isPresent()) {
Review Comment:
It's setup here: `org.apache.hudi.HoodieBaseRelation#buildScan`, where the it is usually derived from `org.apache.hudi.HoodieBaseRelation#tableAvroSchema`
--
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