Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1967 #1968

Merged
merged 2 commits into from
Aug 31, 2024
Merged

#1967 #1968

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 opteryx/__version__.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
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