-
Notifications
You must be signed in to change notification settings - Fork 599
[#12] feat(schema): Implement the schema metadata and type system #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Field.required("audit_info", AuditInfo.class, "The audit info of the lakehouse"); | ||
|
||
@JsonProperty("id") | ||
private Long id; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this Long
type, whether need to be unified to Int
(or Long
) like other schema types?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have strong feelings about using the same type or not. My original thinking is that there might not be so many entities for some types like "tenant" in one database, using integer should be enough.
public class Lakehouse implements Entity, Auditable { | ||
|
||
public static final Field ID = | ||
Field.required("id", Long.class, "The unique identifier of the lakehouse"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this Long.class
type, whether need to be unified to Int.class
like other schema ID? For example Tenant.ID
.
@xunliu PTAL, thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
./gradlew build
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 62076 100 62076 0 0 83773 0 --:--:-- --:--:-- --:--:-- 83660
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
BUILD SUCCESSFUL in 39s
22 actionable tasks: 20 executed, 1 from cache, 1 up-to-date
What changes were proposed in this pull request?
This PR proposes to implement the schema metadata and type system in Java and Protobuf.
Why are the changes needed?
This PR defines a core metadata system for unified catalog.
Does this PR introduce any user-facing change?
NA
How was this patch tested?
This PR adds UT to cover the schema definitions.