rahil-c commented on code in PR #18108:
URL: https://github.com/apache/hudi/pull/18108#discussion_r2805275091
##########
hudi-common/src/main/java/org/apache/hudi/common/schema/HoodieSchema.java:
##########
@@ -1883,6 +1968,107 @@ public int hashCode() {
}
}
+ static class BlobLogicalType extends LogicalType {
+
+ private static final String BLOB_LOGICAL_TYPE_NAME = "blob";
+ // Eager initialization of singleton
+ private static final BlobLogicalType INSTANCE = new BlobLogicalType();
+
+ private BlobLogicalType() {
+ super(BlobLogicalType.BLOB_LOGICAL_TYPE_NAME);
+ }
+
+ public static BlobLogicalType blob() {
+ return INSTANCE;
+ }
+
+ @Override
+ public void validate(Schema schema) {
Review Comment:
Should we be doing any other validation here on the schema? I am assuming
this is the avro model reference, so just curious if we need to check any other
property at this point?
```
{
"type": "record",
"name": "Blob",
"fields": [
{"name": "type", "type": "enum", "symbols": ["INLINE", "OUT_OF_LINE"]},
{"name": "data", "type": ["null", "bytes"]},
{"name": "reference", "type": ["null", {
"type": "record",
"name": "BlobReference",
"fields": [
{"name": "external_path", "type": "string"},
{"name": "offset", "type": "long"},
{"name": "length", "type": "long"},
{"name": "managed", "type": "boolean"}
]
}]}
]
}
```
--
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]