You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by vh...@apache.org on 2026/01/16 09:10:20 UTC
(hudi) branch master updated: feat(schema): Fix null checks after migrating to HoodieSchema (#17909)
This is an automated email from the ASF dual-hosted git repository.
vhs pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hudi.git
The following commit(s) were added to refs/heads/master by this push:
new fee96b6a943e feat(schema): Fix null checks after migrating to HoodieSchema (#17909)
fee96b6a943e is described below
commit fee96b6a943ea30d3be94db1a31a1d6ed6fb033b
Author: voonhous <vo...@gmail.com>
AuthorDate: Fri Jan 16 17:10:13 2026 +0800
feat(schema): Fix null checks after migrating to HoodieSchema (#17909)
---
hudi-common/src/main/java/org/apache/hudi/common/util/HFileUtils.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hudi-common/src/main/java/org/apache/hudi/common/util/HFileUtils.java b/hudi-common/src/main/java/org/apache/hudi/common/util/HFileUtils.java
index bb2aa99e1de9..9f8f3c5cf60d 100644
--- a/hudi-common/src/main/java/org/apache/hudi/common/util/HFileUtils.java
+++ b/hudi-common/src/main/java/org/apache/hudi/common/util/HFileUtils.java
@@ -245,7 +245,7 @@ public class HFileUtils extends FileFormatUtils {
*/
private void logRecordMetadata(String msg, byte[] bs, HoodieSchema schema) throws IOException {
GenericRecord record = HoodieAvroUtils.bytesToAvro(bs, schema.toAvroSchema());
- if (schema.getField(HoodieRecord.RECORD_KEY_METADATA_FIELD) != null) {
+ if (schema.getField(HoodieRecord.RECORD_KEY_METADATA_FIELD).isPresent()) {
LOG.error("{}: Hudi meta field values -> Record key: {}, Partition Path: {}, FileName: {}, CommitTime: {}, CommitSeqNo: {}", msg,
record.get(HoodieRecord.RECORD_KEY_METADATA_FIELD), record.get(HoodieRecord.PARTITION_PATH_METADATA_FIELD),
record.get(HoodieRecord.FILENAME_METADATA_FIELD), record.get(HoodieRecord.COMMIT_TIME_METADATA_FIELD),