linliu-code commented on code in PR #13498:
URL: https://github.com/apache/hudi/pull/13498#discussion_r2197777818
##########
hudi-client/hudi-spark-client/src/main/scala/org/apache/hudi/BaseSparkInternalRowReaderContext.java:
##########
@@ -110,6 +112,23 @@ public HoodieRecord<InternalRow>
constructHoodieRecord(BufferedRecord<InternalRo
return new HoodieSparkRecord(hoodieKey, row,
HoodieInternalRowUtils.getCachedSchema(schema), false);
}
+ @Override
+ public InternalRow constructEngineRecord(Schema schema,
+ Map<Integer, Object> updateValues,
+ BufferedRecord<InternalRow>
baseRecord) {
+ List<Schema.Field> fields = schema.getFields();
+ Object[] values = new Object[fields.size()];
+ for (Schema.Field field : fields) {
+ int pos = field.pos();
+ if (updateValues.containsKey(pos)) {
+ values[pos] = updateValues.get(pos);
+ } else {
+ values[pos] = getValue(baseRecord.getRecord(), schema, field.name());
+ }
+ }
+ return toBinaryRow(schema, new GenericInternalRow(values));
Review Comment:
Sound good. I will remove the usage.
--
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]