You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/11/10 09:47:29 UTC

[GitHub] [arrow-datafusion-python] francis-du opened a new pull request, #73: [Functions] - Add all functions binding

francis-du opened a new pull request, #73:
URL: https://github.com/apache/arrow-datafusion-python/pull/73

   # Which issue does this PR close?
   
   Closes #72 
   
    # Rationale for this change
   <!--
    Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.  
   -->
   
   # What changes are included in this PR?
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   # Are there any user-facing changes?
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please add the `api change` label.
   -->


-- 
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 pull request #73: [Functions] - Add python function binding to `functions`

Posted by GitBox <gi...@apache.org>.
andygrove commented on PR #73:
URL: https://github.com/apache/arrow-datafusion-python/pull/73#issuecomment-1367955423

   Thanks @francis-du. This adds lots of new functionality!


-- 
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 #73: [Functions] - Add python function binding to `functions`

Posted by GitBox <gi...@apache.org>.
andygrove commented on code in PR #73:
URL: https://github.com/apache/arrow-datafusion-python/pull/73#discussion_r1059415456


##########
src/functions.rs:
##########
@@ -23,37 +23,14 @@ use datafusion_expr::{lit, BuiltinScalarFunction};
 use crate::errors;
 use crate::expression::PyExpr;
 
-#[pyfunction]
-fn array(value: Vec<PyExpr>) -> PyExpr {
-    PyExpr {
-        expr: datafusion_expr::array(value.into_iter().map(|x| x.expr).collect::<Vec<_>>()),
-    }
-}
-
 #[pyfunction]
 fn in_list(expr: PyExpr, value: Vec<PyExpr>, negated: bool) -> PyExpr {
     datafusion_expr::in_list(
         expr.expr,
         value.into_iter().map(|x| x.expr).collect::<Vec<_>>(),
         negated,
     )
-    .into()
-}
-
-/// Current date and time
-#[pyfunction]
-fn now() -> PyExpr {
-    PyExpr {
-        expr: datafusion_expr::now(),
-    }
-}
-
-/// Returns a random value in the range 0.0 <= x < 1.0
-#[pyfunction]
-fn random() -> PyExpr {
-    PyExpr {
-        expr: datafusion_expr::random(),
-    }
+        .into()

Review Comment:
   ```suggestion
       .into()
   ```



-- 
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 #73: [Functions] - Add python function binding to `functions`

Posted by GitBox <gi...@apache.org>.
andygrove merged PR #73:
URL: https://github.com/apache/arrow-datafusion-python/pull/73


-- 
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