Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/feldera/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
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.


Note:
You can only ``SELECT`` from materialized tables and views.
Expand Down
1 change: 0 additions & 1 deletion python/tests/runtime/test_doubles.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
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):
Expand Down
Original file line number Diff line number Diff line change
@@ -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):
Expand Down Expand Up @@ -366,6 +365,21 @@ 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"""
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.



# SQRT
class un_int_sqrt(TstView):
def __init__(self):
Expand Down
Loading