Skip to content

Commit

Permalink
fix: PyExpr::__neq__ is not the != oeprator (#1276)
Browse files Browse the repository at this point in the history
  • Loading branch information
danking authored Nov 12, 2024
1 parent d74ac1a commit 5e07dc9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

.PHONY: Makefile help clean rust-html
.PHONY: Makefile help rust-html

# Put it first so that "make" without argument is like "make help".
help:
Expand Down
20 changes: 19 additions & 1 deletion pyvortex/src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,24 @@ use crate::dtype::PyDType;
/// "Joseph"
/// ]
///
/// Read all the rows whose name is _not_ `Joseph`
///
/// >>> name = vortex.expr.column("name")
/// >>> e = vortex.io.read_path("a.vortex", row_filter = name != "Joseph")
/// >>> e.to_arrow_array()
/// <pyarrow.lib.StructArray object at ...>
/// -- is_valid: all not null
/// -- child 0 type: int64
/// [
/// null,
/// 57
/// ]
/// -- child 1 type: string_view
/// [
/// "Angela",
/// "Mikhail"
/// ]
///
/// Read rows whose name is `Angela` or whose age is between 20 and 30, inclusive. Notice that the
/// Angela row is excluded because its age is null. The entire row filtering expression therefore
/// evaluates to null which is interpreted as false:
Expand Down Expand Up @@ -160,7 +178,7 @@ impl PyExpr {
py_binary_opeartor(self_, Operator::Eq, coerce_expr(right)?)
}

fn __neq__<'py>(
fn __ne__<'py>(
self_: PyRef<'py, Self>,
right: &Bound<'py, PyAny>,
) -> PyResult<Bound<'py, PyExpr>> {
Expand Down

0 comments on commit 5e07dc9

Please sign in to comment.