Skip to content

Add support to NUMBER to Python UDFs#28921

Merged
wendigo merged 1 commit intomasterfrom
user/serafin/python-udf-number
Mar 30, 2026
Merged

Add support to NUMBER to Python UDFs#28921
wendigo merged 1 commit intomasterfrom
user/serafin/python-udf-number

Conversation

@wendigo
Copy link
Copy Markdown
Contributor

@wendigo wendigo commented Mar 30, 2026

Resubmitted after accidental merge

Description

Release notes

( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
(x) Release notes are required, with the following suggested text:

## General
* Add support to `NUMBER` type in Python UDF ({issue}`issuenumber`)

@cla-bot cla-bot bot added the cla-signed label Mar 30, 2026
@wendigo wendigo requested a review from findepi March 30, 2026 11:28
@wendigo wendigo force-pushed the user/serafin/python-udf-number branch 2 times, most recently from ac94020 to 94eec10 Compare March 30, 2026 12:57
@wendigo wendigo requested a review from findepi March 30, 2026 13:00
@wendigo wendigo force-pushed the user/serafin/python-udf-number branch from 94eec10 to bba163e Compare March 30, 2026 19:09
@wendigo
Copy link
Copy Markdown
Contributor Author

wendigo commented Mar 30, 2026

@findepi switched to dedicated NUMBER type (23)


assertThat(assertions.query(
query + "SELECT multiply(NUMBER '+Infinity', NUMBER '-Infinity')"))
.matches("VALUES NUMBER '-Infinity'");
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is according to python :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

>>> import decimal
>>> decimal.Decimal('Infinity') * decimal.Decimal('-Infinity')
Decimal('-Infinity')

@wendigo wendigo force-pushed the user/serafin/python-udf-number branch from bba163e to 868aa1f Compare March 30, 2026 19:11
@wendigo wendigo force-pushed the user/serafin/python-udf-number branch from 868aa1f to 7c8d87a Compare March 30, 2026 19:13
@wendigo wendigo merged commit a35b239 into master Mar 30, 2026
18 checks passed
@wendigo wendigo deleted the user/serafin/python-udf-number branch March 30, 2026 19:37
@github-actions github-actions bot added this to the 481 milestone Mar 30, 2026
@ebyhr ebyhr mentioned this pull request Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants