From a792906d5fd6b2dcbfd5e4a4938ce2cf5b005d89 Mon Sep 17 00:00:00 2001 From: joocer Date: Thu, 5 Sep 2024 23:56:10 +0100 Subject: [PATCH 1/2] 0.17.0 --- opteryx/__version__.py | 2 +- opteryx/connectors/capabilities/predicate_pushable.py | 2 +- opteryx/operators/async_read_node.py | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/opteryx/__version__.py b/opteryx/__version__.py index a978c7034..0c7eb9438 100644 --- a/opteryx/__version__.py +++ b/opteryx/__version__.py @@ -29,7 +29,7 @@ class VersionStatus(Enum): _major = 0 _minor = 17 _revision = 0 -_status = VersionStatus.ALPHA +_status = VersionStatus.RELEASE __author__ = "@joocer" __version__ = f"{_major}.{_minor}.{_revision}" + ( diff --git a/opteryx/connectors/capabilities/predicate_pushable.py b/opteryx/connectors/capabilities/predicate_pushable.py index 00aa4b041..69547f515 100644 --- a/opteryx/connectors/capabilities/predicate_pushable.py +++ b/opteryx/connectors/capabilities/predicate_pushable.py @@ -88,7 +88,7 @@ def _predicate_to_dnf(root): raise NotSupportedError() if root.left.node_type != NodeType.IDENTIFIER: root.left, root.right = root.right, root.left - if root.right.type in (OrsoTypes.DATE): + if root.right.type == OrsoTypes.DATE: date_val = root.right.value if hasattr(date_val, "item"): date_val = date_val.item() diff --git a/opteryx/operators/async_read_node.py b/opteryx/operators/async_read_node.py index a88a0a6ad..9f5377a43 100644 --- a/opteryx/operators/async_read_node.py +++ b/opteryx/operators/async_read_node.py @@ -30,6 +30,7 @@ import pyarrow import pyarrow.parquet from orso.schema import RelationSchema +from orso.schema import convert_orso_schema_to_arrow_schema from opteryx import config from opteryx.exceptions import DataError @@ -228,3 +229,9 @@ def execute(self) -> Generator: if morsel: self.statistics.columns_read += morsel.num_columns + else: + self.statistics.empty_datasets += 1 + arrow_schema = convert_orso_schema_to_arrow_schema(orso_schema, use_identities=True) + yield pyarrow.Table.from_arrays( + [pyarrow.array([]) for _ in arrow_schema], schema=arrow_schema + ) From 3764a1f5add3fb0285b7bf5ea468961044aa6df2 Mon Sep 17 00:00:00 2001 From: XB500 Date: Thu, 5 Sep 2024 22:57:13 +0000 Subject: [PATCH 2/2] Opteryx Version 0.17.0 --- opteryx/__version__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opteryx/__version__.py b/opteryx/__version__.py index 0c7eb9438..3a38500a0 100644 --- a/opteryx/__version__.py +++ b/opteryx/__version__.py @@ -1,4 +1,4 @@ -__build__ = 767 +__build__ = 768 # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.