From 8a0196990812fb1579ccc7021f7e5b8259528912 Mon Sep 17 00:00:00 2001 From: joocer Date: Sat, 31 Aug 2024 17:47:43 +0100 Subject: [PATCH 1/2] #1967 --- opteryx/compiled/list_ops/cython_list_ops.pyx | 4 ++-- .../cost_based_optimizer/strategies/constant_folding.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/opteryx/compiled/list_ops/cython_list_ops.pyx b/opteryx/compiled/list_ops/cython_list_ops.pyx index a557705d..badfe448 100644 --- a/opteryx/compiled/list_ops/cython_list_ops.pyx +++ b/opteryx/compiled/list_ops/cython_list_ops.pyx @@ -63,7 +63,7 @@ cpdef cnp.ndarray[cnp.npy_bool, ndim=1] cython_anyop_eq(object literal, cnp.ndar cdef: cdef Py_ssize_t i, j cdef Py_ssize_t num_rows = arr.shape[0] - cnp.ndarray[cnp.npy_bool, ndim=1] result = numpy.zeros(num_rows, dtype=numpy.uint8) + cnp.ndarray[cnp.npy_bool, ndim=1] result = numpy.full(num_rows, False, dtype=bool) cnp.ndarray row for i in range(num_rows): @@ -71,7 +71,7 @@ cpdef cnp.ndarray[cnp.npy_bool, ndim=1] cython_anyop_eq(object literal, cnp.ndar if row is not None: for j in range(row.shape[0]): if row[j] == literal: - result[i] = 1 + result[i] = True break return result diff --git a/opteryx/planner/cost_based_optimizer/strategies/constant_folding.py b/opteryx/planner/cost_based_optimizer/strategies/constant_folding.py index 9f68ebb1..c0006e4e 100644 --- a/opteryx/planner/cost_based_optimizer/strategies/constant_folding.py +++ b/opteryx/planner/cost_based_optimizer/strategies/constant_folding.py @@ -263,7 +263,7 @@ def fold_constants(root: Node) -> Node: if len(identifiers) == 0 and len(aggregators) == 0: table = no_table_data.read() try: - result = evaluate(root, table, None)[0] + result = evaluate(root, table)[0] return build_literal_node(result, root, root.schema_column.type) except (ValueError, TypeError, KeyError) as err: # nosec if not err: From 305199c487dcdb204251b4645e498e0942e3bddd Mon Sep 17 00:00:00 2001 From: XB500 Date: Sat, 31 Aug 2024 16:48:16 +0000 Subject: [PATCH 2/2] Opteryx Version 0.17.0-alpha.758 --- opteryx/__version__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opteryx/__version__.py b/opteryx/__version__.py index 149a3d32..e2d502da 100644 --- a/opteryx/__version__.py +++ b/opteryx/__version__.py @@ -1,4 +1,4 @@ -__build__ = 756 +__build__ = 758 # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.