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

Support copying numerics with larger scale than precision #98

Open
wants to merge 1 commit into
base: aykut/error-if-special-numeric
Choose a base branch
from

Conversation

aykut-bozkurt
Copy link
Collaborator

In parquet, we cannot write numeric with larger scale than precision. But postgres allows it. We can adjust the numeric typmod in that case.

@aykut-bozkurt aykut-bozkurt force-pushed the aykut/error-if-special-numeric branch from fa13238 to 58327af Compare January 16, 2025 06:57
@aykut-bozkurt aykut-bozkurt force-pushed the aykut/numeric-with-larger-scale branch from d05fcf3 to 0cc2487 Compare January 16, 2025 06:58
@aykut-bozkurt aykut-bozkurt force-pushed the aykut/error-if-special-numeric branch from 58327af to 4637490 Compare January 16, 2025 07:53
@aykut-bozkurt aykut-bozkurt force-pushed the aykut/numeric-with-larger-scale branch from 0cc2487 to b8f9061 Compare January 16, 2025 07:54
scale = 0;
}

// Even if PG allows scale to be greater than precision, arrow does not. We set precision to scale.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could be good to comment on why this is ok

@aykut-bozkurt aykut-bozkurt force-pushed the aykut/error-if-special-numeric branch from 4637490 to 4056ad2 Compare January 22, 2025 13:59
@aykut-bozkurt aykut-bozkurt force-pushed the aykut/numeric-with-larger-scale branch from b8f9061 to 80f9a11 Compare January 22, 2025 14:00
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.

2 participants