-
Notifications
You must be signed in to change notification settings - Fork 77
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
feat: add some more BaseProtoTypes #239
Conversation
FIXED_CHAR = wrap(Type.FixedChar.newBuilder().setNullability(nullability).build()); | ||
FIXED_BINARY = wrap(Type.FixedBinary.newBuilder().setNullability(nullability).build()); | ||
DECIMAL = wrap(Type.Decimal.newBuilder().setNullability(nullability).build()); | ||
MAP = wrap(Type.Map.newBuilder().setNullability(nullability).build()); |
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.
Without a type you're going to need to get a builder, add the type, and then build it again. Is it worth having a base type for this case?
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.
Without a type you're going to need to get a builder, add the type, and then build it again. Is it worth having a base type for this case?
These types require additional parameters (such as precision and length) to construct, which seems not suitable for adding.
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 think this pr can be close, this is not a good adding.
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.
VARCHAR, FIXED_CHAR, FIXED_BINARY all should be good to go.
DECIMAL, MAP, LIST, and STRUCT all have some sort of parameter and thus need to be functions.
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.
Hmm, except that those three types all expect to use the literal size as their parameter so without even a literal they aren't fully specified. I agree, there aren't any more types that work with a simple type.
If we do want something for these they'd have to be functions (perhaps returning cached values) but there's not much perceivable gain there.
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.
Hmm, except that those three types all expect to use the literal size as their parameter so without even a literal they aren't fully specified. I agree, there aren't any more types that work with a simple type.
If we do want something for these they'd have to be functions (perhaps returning cached values) but there's not much perceivable gain there.
Maybe VARCHAR, FIXED_CHAR, FIXED_BINARY also need a size parameter?
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 do wonder if these are going to be directly usable without a size parameter. But I haven't written any code using these. Let's see if someone else has an opinion.
A number of these are fine such as interval_day. I'll come up with a list. |
No description provided.