roryqi commented on code in PR #14540:
URL: https://github.com/apache/gravitino/pull/14540#discussion_r4524175837
##########
core/src/main/java/org/apache/gravitino/storage/relational/service/SchemaMetaService.java:
##########
@@ -178,7 +179,7 @@ public void insertSchema(SchemaEntity schemaEntity, boolean
overwrite) throws IO
.withNamespace(schemaEntity.namespace())
.withComment(null)
.withProperties(Collections.emptyMap())
- .withAuditInfo(schemaEntity.auditInfo())
+ .withAuditInfo(AuditInfo.EMPTY)
Review Comment:
Yes, intentional: a missing Gravitino registration does not mean the
external ancestor was created by this request. Copying the leaf's audit would
attribute an existing `A` to Alice when she creates `A:B`. The IRC hook
explicitly imports ancestors with the request audit only when it actually
created them.
The `NOT NULL` constraint applies to the `audit_info` JSON column, not its
creator field. `AuditInfo.EMPTY` serializes to a non-null JSON object; its
individual fields are optional. Schema list/get and audit DTO conversion
support null creators. In aeaa890f65, I documented this intent and expanded
`testInsertHierarchicalSchemaCreatesAncestorsAndLeaf` to verify the stored
JSON, list/get and DTO fields for both ancestors and the leaf. Two H2 tests and
37 core unit tests passed; Spotless passed.
--
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]