From b448919ee9f183c1b926539f22095ef628c94c70 Mon Sep 17 00:00:00 2001 From: Mihai Budiu Date: Sat, 16 May 2026 23:45:47 -0700 Subject: [PATCH 1/2] [python] Test case for #5520 (incorrect serialization of infinity) Signed-off-by: Mihai Budiu --- python/feldera/pipeline.py | 2 +- python/tests/runtime/test_doubles.py | 1 - .../aggregate_tests4/test_map_arg_max.py | 5 ----- .../test_un_int_arith_fn.py | 19 +++++++++++++++++-- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/python/feldera/pipeline.py b/python/feldera/pipeline.py index 848b447ee2..4599db3ff5 100644 --- a/python/feldera/pipeline.py +++ b/python/feldera/pipeline.py @@ -1045,7 +1045,7 @@ def query_arrow(self, query: str) -> Generator[pa.RecordBatch, None, None]: def query_arrow_dicts(self, query: str) -> Generator[Mapping[str, Any], None, None]: """ 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. Note: You can only ``SELECT`` from materialized tables and views. diff --git a/python/tests/runtime/test_doubles.py b/python/tests/runtime/test_doubles.py index 0b649cd8f1..28aa9df05a 100644 --- a/python/tests/runtime/test_doubles.py +++ b/python/tests/runtime/test_doubles.py @@ -48,7 +48,6 @@ def test_local(self): pipeline.wait_for_completion() data = list(pipeline.query_arrow_dicts("SELECT * FROM v")) - print(data) assert len(data) == 1 assert data[0]["one"] == float("inf") assert math.isnan(data[0]["zero"]) diff --git a/python/tests/runtime_aggtest/aggregate_tests4/test_map_arg_max.py b/python/tests/runtime_aggtest/aggregate_tests4/test_map_arg_max.py index addae6b8cc..0ad30b0ae1 100644 --- a/python/tests/runtime_aggtest/aggregate_tests4/test_map_arg_max.py +++ b/python/tests/runtime_aggtest/aggregate_tests4/test_map_arg_max.py @@ -1,11 +1,6 @@ from tests.runtime_aggtest.aggtst_base import TstView import pyarrow as pa - -def mkmap(d): - return pa.array(d, type=pa.map_(pa.string(), pa.int64())).to_pylist() - - class aggtst_map_arg_max_value(TstView): def __init__(self): # checked manually diff --git a/python/tests/runtime_aggtest/unsigned_int_tests/test_un_int_arith_fn.py b/python/tests/runtime_aggtest/unsigned_int_tests/test_un_int_arith_fn.py index 5510c02492..cd5b857a07 100644 --- a/python/tests/runtime_aggtest/unsigned_int_tests/test_un_int_arith_fn.py +++ b/python/tests/runtime_aggtest/unsigned_int_tests/test_un_int_arith_fn.py @@ -1,7 +1,6 @@ -from tests.runtime_aggtest.aggtst_base import TstView +from tests.runtime_aggtest.aggtst_base import TstTable, TstView -# NOTE: SINH, COSH, EXP tests are supplied smaller input due to: https://github.com/feldera/feldera/issues/5520 # ABS class un_int_abs(TstView): def __init__(self): @@ -366,6 +365,22 @@ def __init__(self): WHERE id = 1""" + +class tableIssue5520(TstTable): + def __init__(self): + self.sql = "CREATE TABLE tbl5520(dbl DOUBLE);" + self.data = [ { "dbl": 10192.0 } ] + + +# SINH +class issue5520(TstView): + def __init__(self): + self.data = [{ "d": "Infinity" }] + self.sql = """CREATE MATERIALIZED VIEW issue5520view AS SELECT + CAST(SINH(dbl) AS VARCHAR) AS d + FROM tbl5520""" + + # SQRT class un_int_sqrt(TstView): def __init__(self): From 05182b92a3d72a1a060df21dfe414294d32a4312 Mon Sep 17 00:00:00 2001 From: feldera-bot Date: Sun, 17 May 2026 06:54:44 +0000 Subject: [PATCH 2/2] [ci] apply automatic fixes Signed-off-by: feldera-bot --- .../runtime_aggtest/aggregate_tests4/test_map_arg_max.py | 2 +- .../unsigned_int_tests/test_un_int_arith_fn.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/python/tests/runtime_aggtest/aggregate_tests4/test_map_arg_max.py b/python/tests/runtime_aggtest/aggregate_tests4/test_map_arg_max.py index 0ad30b0ae1..edc961f7b0 100644 --- a/python/tests/runtime_aggtest/aggregate_tests4/test_map_arg_max.py +++ b/python/tests/runtime_aggtest/aggregate_tests4/test_map_arg_max.py @@ -1,5 +1,5 @@ from tests.runtime_aggtest.aggtst_base import TstView -import pyarrow as pa + class aggtst_map_arg_max_value(TstView): def __init__(self): diff --git a/python/tests/runtime_aggtest/unsigned_int_tests/test_un_int_arith_fn.py b/python/tests/runtime_aggtest/unsigned_int_tests/test_un_int_arith_fn.py index cd5b857a07..30c66f0054 100644 --- a/python/tests/runtime_aggtest/unsigned_int_tests/test_un_int_arith_fn.py +++ b/python/tests/runtime_aggtest/unsigned_int_tests/test_un_int_arith_fn.py @@ -365,17 +365,16 @@ def __init__(self): WHERE id = 1""" - class tableIssue5520(TstTable): def __init__(self): self.sql = "CREATE TABLE tbl5520(dbl DOUBLE);" - self.data = [ { "dbl": 10192.0 } ] + self.data = [{"dbl": 10192.0}] # SINH class issue5520(TstView): def __init__(self): - self.data = [{ "d": "Infinity" }] + self.data = [{"d": "Infinity"}] self.sql = """CREATE MATERIALIZED VIEW issue5520view AS SELECT CAST(SINH(dbl) AS VARCHAR) AS d FROM tbl5520"""