yihua commented on code in PR #13213:
URL: https://github.com/apache/hudi/pull/13213#discussion_r2057840517
##########
hudi-common/src/main/java/org/apache/hudi/common/engine/HoodieReaderContext.java:
##########
@@ -286,58 +268,23 @@ public abstract HoodieRecord<T>
constructHoodieRecord(Option<T> recordOption,
public abstract T seal(T record);
/**
- * Generates metadata map based on the information.
+ * Convert engine specific row into binary format.
*
- * @param recordKey Record key in String.
- * @param partitionPath Partition path in String.
- * @param orderingVal Ordering value in String.
- * @return A mapping containing the metadata.
- */
- public Map<String, Object> generateMetadataForRecord(
- String recordKey, String partitionPath, Comparable orderingVal) {
- Map<String, Object> meta = new HashMap<>();
- meta.put(INTERNAL_META_RECORD_KEY, recordKey);
- meta.put(INTERNAL_META_PARTITION_PATH, partitionPath);
- meta.put(INTERNAL_META_ORDERING_FIELD, orderingVal);
- return meta;
- }
-
- /**
- * Generates metadata of the record. Only fetches record key that is
necessary for merging.
+ * @param avroSchema The avro schema of the row
+ * @param record The engine row
*
- * @param record The record.
- * @param schema The Avro schema of the record.
- * @return A mapping containing the metadata.
+ * @return row in binary format
*/
- public Map<String, Object> generateMetadataForRecord(T record, Schema
schema) {
- Map<String, Object> meta = new HashMap<>();
- meta.put(INTERNAL_META_RECORD_KEY, getRecordKey(record, schema));
- meta.put(INTERNAL_META_SCHEMA_ID, encodeAvroSchema(schema));
- return meta;
- }
+ public abstract T toBinaryRow(Schema avroSchema, T record);
/**
* Gets the schema encoded in the metadata map
*
- * @param infoMap The record metadata
+ * @param record buffered record
Review Comment:
Also update javadocs to remove `metadata map`
```suggestion
* @param record {@link BufferedRecord} object with engine-specific type
```
--
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]