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

   ### Change Logs
   
   If reading column stats from an older version of Hudi, `isTightBound` field 
is not present. We should handle that appropriately, otherwise it leads to 
below exception:
   ```
   Caused by: org.apache.hudi.exception.HoodieException: Unable to instantiate 
payload class 
       at 
org.apache.hudi.common.util.HoodieRecordUtils.loadPayload(HoodieRecordUtils.java:114)
       at 
org.apache.hudi.common.util.SpillableMapUtils.convertToHoodieRecordPayload(SpillableMapUtils.java:155)
       at 
org.apache.hudi.metadata.HoodieBackedTableMetadata.composeRecord(HoodieBackedTableMetadata.java:560)
       at 
org.apache.hudi.metadata.HoodieBackedTableMetadata.lambda$fetchBaseFileRecordsByKeys$11(HoodieBackedTableMetadata.java:435)
       at 
java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:215)
       at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
       at 
java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1939)
       at 
java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:570)
       at 
java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:560)
       at 
java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
       at 
java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:265)
       at 
java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:727)
       at 
org.apache.hudi.metadata.HoodieBackedTableMetadata.fetchBaseFileRecordsByKeys(HoodieBackedTableMetadata.java:437)
       at 
org.apache.hudi.metadata.HoodieBackedTableMetadata.readFromBaseAndMergeWithLogRecords(HoodieBackedTableMetadata.java:402)
       at 
org.apache.hudi.metadata.HoodieBackedTableMetadata.lambda$getRecordsByKeyPrefixes$7539c171$1(HoodieBackedTableMetadata.java:237)
       at 
org.apache.hudi.common.function.FunctionWrapper.lambda$throwingMapWrapper$0(FunctionWrapper.java:38)
       ... 27 more
   Caused by: java.lang.reflect.InvocationTargetException
       at 
java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:74)
       at 
java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:501)
       at 
java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:485)
       at 
org.apache.hudi.common.util.HoodieRecordUtils.loadPayload(HoodieRecordUtils.java:112)
       ... 42 more
   Caused by: org.apache.avro.AvroRuntimeException: Not a valid schema field: 
isTightBound
       at org.apache.avro.generic.GenericData$Record.get(GenericData.java:282)
       at 
org.apache.hudi.metadata.MetadataPartitionType.constructColumnStatsMetadataPayload(MetadataPartitionType.java:318)
       at 
org.apache.hudi.metadata.MetadataPartitionType.access$200(MetadataPartitionType.java:97)
       at 
org.apache.hudi.metadata.MetadataPartitionType$2.constructMetadataPayload(MetadataPartitionType.java:122)
       at 
org.apache.hudi.metadata.HoodieMetadataPayload.<init>(HoodieMetadataPayload.java:204)
       at 
org.apache.hudi.metadata.HoodieMetadataPayload.<init>(HoodieMetadataPayload.java:190)
       at 
java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
       ... 45 more 
   ```
   
   ### Impact
   
   1.0 can read 0.x column stats.
   
   ### Risk level (write none, low medium or high below)
   
   low
   
   ### Documentation Update
   
   _Describe any necessary documentation update if there is any new feature, 
config, or user-facing change. If not, put "none"._
   
   - _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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to