wzx140 commented on code in PR #7003:
URL: https://github.com/apache/hudi/pull/7003#discussion_r1027299190
##########
hudi-client/hudi-spark-client/src/main/scala/org/apache/hudi/HoodieInternalRowUtils.scala:
##########
@@ -172,24 +214,22 @@ object HoodieInternalRowUtils {
}
}
- /**
- * @see
org.apache.hudi.avro.HoodieAvroUtils#rewriteRecordWithMetadata(org.apache.avro.generic.GenericRecord,
org.apache.avro.Schema, java.lang.String)
- */
- def rewriteRecordWithMetadata(record: InternalRow, oldSchema: StructType,
newSchema: StructType, fileName: String): InternalRow = {
- val newRecord = rewriteRecord(record, oldSchema, newSchema)
- newRecord.update(HoodieMetadataField.FILENAME_METADATA_FIELD.ordinal,
CatalystTypeConverters.convertToCatalyst(fileName))
+ def compareSchema(left: StructType, right: StructType): Boolean = {
+ val schemaPair = (left, right)
+ if (!schemaCompareMap.contains(schemaPair)) {
Review Comment:
Ok. rewriteRecord and rewriteRecordWithNewSchema is fixed
--
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]