Skip to content
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

Closed
wants to merge 3 commits into from

Conversation

xiedeyantu
Copy link

No description provided.

@CLAassistant
Copy link

CLAassistant commented Mar 21, 2024

CLA assistant check
All committers have signed the CLA.

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());
Copy link
Member

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?

Copy link
Author

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.

Copy link
Author

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.

Copy link
Member

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.

Copy link
Member

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.

Copy link
Author

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?

Copy link
Member

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.

@EpsilonPrime
Copy link
Member

A number of these are fine such as interval_day. I'll come up with a list.

@EpsilonPrime EpsilonPrime changed the title Add some type for BaseProtoTypes feat: add some more BaseProtoTypes Mar 22, 2024
@xiedeyantu xiedeyantu requested a review from EpsilonPrime March 25, 2024 08:42
@xiedeyantu xiedeyantu closed this Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants