Skip to content

[python] Test case for #5520 (incorrect serialization of infinity)#6259

Queued
mihaibudiu wants to merge 2 commits into
mainfrom
issue5520
Queued

[python] Test case for #5520 (incorrect serialization of infinity)#6259
mihaibudiu wants to merge 2 commits into
mainfrom
issue5520

Conversation

@mihaibudiu
Copy link
Copy Markdown
Contributor

Fixes #5520

(In fact, the issue was fixed previously, this is a test that shows we can close the issue)
This commit also contains three review fixes I forgot to commit in my previous PR flagged by fred's review.

Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
@mihaibudiu mihaibudiu enabled auto-merge May 17, 2026 06:47
@mihaibudiu mihaibudiu requested review from gz and rivudhk May 17, 2026 06:47
Signed-off-by: feldera-bot <feldera-bot@feldera.com>
@mihaibudiu mihaibudiu added this pull request to the merge queue May 17, 2026
Any commits made after this event will not be merged.
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 17, 2026
@gz gz added this pull request to the merge queue May 17, 2026
Any commits made after this event will not be merged.
"""
Executes an ad-hoc SQL query on this pipeline and returns a generator
that yields the result as a list of Dictionaries.
that yields the result as a sequence of Dictionaries.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good catch on listsequence. While you are in the docstring, the :return: line a few lines below still says "A generator that yields pyarrow.Mapping objects." — that is the second half of the same nit from PR #6250. It yields plain dicts; please fix this one too.

self.data = [{"d": "Infinity"}]
self.sql = """CREATE MATERIALIZED VIEW issue5520view AS SELECT
CAST(SINH(dbl) AS VARCHAR) AS d
FROM tbl5520"""
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Issue #5520 reports the bug for EXP, SINH, and COSH, but this regression test only exercises SINH. The three go through different code paths in sqllib (separate Rust intrinsics, separate Calcite-level rewrites). If only SINH is covered, an EXP/COSH regression of the same shape would not be caught. Please add views for EXP(dbl) and COSH(dbl) (same tbl5520, expected "Infinity") so the test actually matches the issue.

Copy link
Copy Markdown

@mythical-fred mythical-fred left a comment

Choose a reason for hiding this comment

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

LGTM

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.

[SQL] EXP, SINH, COSH functions produce NULL for inputs that generate extremely large results

4 participants