You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "jdye64 (via GitHub)" <gi...@apache.org> on 2023/02/22 18:10:39 UTC

[GitHub] [arrow-datafusion-python] jdye64 opened a new pull request, #214: wrap display_name and canonical_name functions

jdye64 opened a new pull request, #214:
URL: https://github.com/apache/arrow-datafusion-python/pull/214

   # Which issue does this PR close?
   
   Closes #213


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion-python] andygrove commented on a diff in pull request #214: wrap display_name and canonical_name functions

Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on code in PR #214:
URL: https://github.com/apache/arrow-datafusion-python/pull/214#discussion_r1115096138


##########
src/expr.rs:
##########
@@ -79,6 +79,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())
+    }

Review Comment:
   minor nit: this method is infallible, so no need to wrap in a result.
   
   ```suggestion
       fn canonical_name(&self) -> String {
           self.expr.canonical_name()
       }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion-python] andygrove merged pull request #214: wrap display_name and canonical_name functions

Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove merged PR #214:
URL: https://github.com/apache/arrow-datafusion-python/pull/214


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org