danny0405 commented on code in PR #13078:
URL: https://github.com/apache/hudi/pull/13078#discussion_r2049814438
##########
hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/client/model/HoodieFlinkRecord.java:
##########
@@ -112,15 +135,24 @@ public HoodieRecord joinWith(HoodieRecord other, Schema
targetSchema) {
@Override
public HoodieRecord prependMetaFields(Schema recordSchema, Schema
targetSchema, MetadataValues metadataValues, Properties props) {
- int metaFieldSize = targetSchema.getFields().size() -
recordSchema.getFields().size();
- GenericRowData metaRow = new GenericRowData(metaFieldSize);
+ boolean withMetaFields = recordSchema.getField(RECORD_KEY_METADATA_FIELD)
!= null;
+ boolean withOperationField =
targetSchema.getField(OPERATION_METADATA_FIELD) != null;
+ int metaFieldSize = HOODIE_META_COLUMNS.size();
+ String[] metaFields = new String[metaFieldSize];
+ if (withMetaFields) {
+ for (int i = 0; i < metaFieldSize; i++) {
+ metaFields[i] = data.getString(i).toString();
Review Comment:
Not sure why get the metadata field from the data itself?
--
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]