Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
joocer committed Aug 31, 2024
1 parent 6de28a4 commit 8a01969
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions opteryx/compiled/list_ops/cython_list_ops.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ 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):
row = arr[i]
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 8a01969

Please sign in to comment.