This is an automated email from the ASF dual-hosted git repository.
agrove pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion-python.git
The following commit(s) were added to refs/heads/main by this push:
new 9509bc1 wrap display_name and canonical_name functions (#214)
9509bc1 is described below
commit 9509bc1454becda338be5d11b8faf33cdf45645d
Author: Jeremy Dyer <[email protected]>
AuthorDate: Wed Feb 22 18:50:38 2023 -0500
wrap display_name and canonical_name functions (#214)
---
src/expr.rs | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/expr.rs b/src/expr.rs
index 5cd3aa5..2d4c38b 100644
--- a/src/expr.rs
+++ b/src/expr.rs
@@ -80,6 +80,17 @@ impl PyExpr {
})
}
+ /// Returns the name of this expression as it should appear in a schema.
This name
+ /// will not include any CAST expressions.
+ fn display_name(&self) -> PyResult<String> {
+ Ok(self.expr.display_name()?)
+ }
+
+ /// Returns a full and complete string representation of this expression.
+ fn canonical_name(&self) -> PyResult<String> {
+ Ok(self.expr.canonical_name())
+ }
+
fn __richcmp__(&self, other: PyExpr, op: CompareOp) -> PyExpr {
let expr = match op {
CompareOp::Lt => self.expr.clone().lt(other.expr),