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

Do we need to public the MAX_DECIMAL_FOR_LARGER_PRECISION and MIN_DECIMAL_FOR_EACH_PRECISION #2343

Closed
liukun4515 opened this issue Aug 6, 2022 · 7 comments
Assignees
Labels
question Further information is requested

Comments

@liukun4515
Copy link
Contributor

liukun4515 commented Aug 6, 2022

Which part is this question about

FYI #2320

For #2320, I will change the MIN and MAX array to bytes array. This will make a API break changes.

@viirya @alamb

Describe your question

Additional context

@liukun4515 liukun4515 added the question Further information is requested label Aug 6, 2022
@liukun4515
Copy link
Contributor Author

liukun4515 commented Aug 6, 2022

But in the preview release, we have exposed the
MAX_DECIMAL_FOR_EACH_PRECISION and MIN_DECIMAL_FOR_EACH_PRECISION

@alamb
Copy link
Contributor

alamb commented Aug 6, 2022

Hi @liukun4515

Are you suggesting that the constants such as MAX_DECIMAL_FOR_EACH_PRECISION etc should not be pub because you plan to change them in the future as part of #2320 ?

For anyone else who is interested, here is a link to the constants in question for your reference:
https://sourcegraph.com/github.com/apache/arrow-rs/-/blob/arrow/src/datatypes/datatype.rs?L268-436&subtree=true

@liukun4515
Copy link
Contributor Author

Hi @liukun4515

Are you suggesting that the constants such as MAX_DECIMAL_FOR_EACH_PRECISION etc should not be pub because you plan to change them in the future as part of #2320 ?

For anyone else who is interested, here is a link to the constants in question for your reference: https://sourcegraph.com/github.com/apache/arrow-rs/-/blob/arrow/src/datatypes/datatype.rs?L268-436&subtree=true

Yes, we don't need to expose these two constant variables.
But I don't know why we expose the min and max for decimal128, maybe just missing them.

@alamb

@alamb
Copy link
Contributor

alamb commented Aug 6, 2022

it might be worth creating a PR with any proposed changes you have in mind so we can evaluate them.

Also, given we have been cranking out new major semver releases every 2 weeks I think it is ok if the API changes frequently in some of the areas that have more active churn and feature maturation like Decimal

@liukun4515
Copy link
Contributor Author

it might be worth creating a PR with any proposed changes you have in mind so we can evaluate them.

Also, given we have been cranking out new major semver releases every 2 weeks I think it is ok if the API changes frequently in some of the areas that have more active churn and feature maturation like Decimal

👌

@liukun4515 liukun4515 self-assigned this Aug 6, 2022
@viirya
Copy link
Member

viirya commented Aug 6, 2022

I think it is a minor change. Although these const values are exposed, I cannot think about it will be heavily depended. Sounds okay to hide them.

@tustvold
Copy link
Contributor

I tried to make these private in #2711 (comment) but they are currently in use by DataFusion.

As more decimal logic gets moved to arrow-rs we may be able to remove these, but currently they are needed

@tustvold tustvold closed this as not planned Won't fix, can't repro, duplicate, stale Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants