Skip to content

Commit 5e07dc9

Browse files
authored
fix: PyExpr::__neq__ is not the != oeprator (#1276)
1 parent d74ac1a commit 5e07dc9

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ SPHINXBUILD ?= sphinx-build
88
SOURCEDIR = .
99
BUILDDIR = _build
1010

11-
.PHONY: Makefile help clean rust-html
11+
.PHONY: Makefile help rust-html
1212

1313
# Put it first so that "make" without argument is like "make help".
1414
help:

pyvortex/src/expr.rs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,24 @@ use crate::dtype::PyDType;
8080
/// "Joseph"
8181
/// ]
8282
///
83+
/// Read all the rows whose name is _not_ `Joseph`
84+
///
85+
/// >>> name = vortex.expr.column("name")
86+
/// >>> e = vortex.io.read_path("a.vortex", row_filter = name != "Joseph")
87+
/// >>> e.to_arrow_array()
88+
/// <pyarrow.lib.StructArray object at ...>
89+
/// -- is_valid: all not null
90+
/// -- child 0 type: int64
91+
/// [
92+
/// null,
93+
/// 57
94+
/// ]
95+
/// -- child 1 type: string_view
96+
/// [
97+
/// "Angela",
98+
/// "Mikhail"
99+
/// ]
100+
///
83101
/// Read rows whose name is `Angela` or whose age is between 20 and 30, inclusive. Notice that the
84102
/// Angela row is excluded because its age is null. The entire row filtering expression therefore
85103
/// evaluates to null which is interpreted as false:
@@ -160,7 +178,7 @@ impl PyExpr {
160178
py_binary_opeartor(self_, Operator::Eq, coerce_expr(right)?)
161179
}
162180

163-
fn __neq__<'py>(
181+
fn __ne__<'py>(
164182
self_: PyRef<'py, Self>,
165183
right: &Bound<'py, PyAny>,
166184
) -> PyResult<Bound<'py, PyExpr>> {

0 commit comments

Comments
 (0)