[python] Test case for #5520 (incorrect serialization of infinity)#6259
[python] Test case for #5520 (incorrect serialization of infinity)#6259mihaibudiu wants to merge 2 commits into
Conversation
Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
Signed-off-by: feldera-bot <feldera-bot@feldera.com>
| """ | ||
| 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. |
There was a problem hiding this comment.
Good catch on list → sequence. 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""" |
There was a problem hiding this comment.
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.
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.