Skip to content

test(c/driver/postgresql): use hypothesis to test decimal ingest - #4852

Merged
lidavidm merged 1 commit into
apache:mainfrom
lidavidm:pghypothesis
Oct 7, 2026
Merged

lidavidm merged 1 commit into
apache:mainfrom
lidavidm:pghypothesis

Conversation

@lidavidm

@lidavidm lidavidm commented Oct 5, 2026

Copy link
Copy Markdown
Member

We keep finding bugs in decimals; try to add another layer of validation.

@lidavidm
lidavidm marked this pull request as ready for review October 5, 2026 05:44
@lidavidm
lidavidm requested a review from zeroshade as a code owner October 5, 2026 05:44
@lidavidm
lidavidm requested review from Mandukhai-Alimaa and removed request for zeroshade October 5, 2026 05:44
Comment on lines +41 to +46
@st.composite
def st_decimal_precision_scale(draw) -> tuple[int, int]:
precision = draw(st.integers(min_value=1, max_value=38))
# TODO: we should also test negative scales
scale = draw(st.integers(min_value=0, max_value=min(precision, 37)))
return precision, scale

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this seems not used?

We keep finding bugs in decimals; try to add another layer of
validation.
@lidavidm
lidavidm merged commit 0ea9ede into apache:main Oct 7, 2026
98 checks passed
@lidavidm
lidavidm deleted the pghypothesis branch October 7, 2026 03:18
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