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 2021/11/26 22:19:20 UTC

[GitHub] [arrow-datafusion] tobyhede edited a comment on issue #1364: Documentation for using scalar functions with the the DataFrame API

tobyhede edited a comment on issue #1364:
URL: https://github.com/apache/arrow-datafusion/issues/1364#issuecomment-980450411


   Thanks @xudong963. The core docs are very good, but don't seem to include any examples of using the scalar functions  `lower, upper, starts_with, etc` . I've been trying permutations with no luck.
   
   eg My assumption (based on the equality operators) was that something like this should work:
   ```
     .filter(col("some_col").starts_with(lit("alpha")))
   ```
   
   In the above, `starts_with` isn't found in the scope.
   
   I can do this:
   ```
   .filter(starts_with(lit("alpha")))
   ```
   But this fails at runtime saying:
   ```
   Error: Plan("Coercion from [Utf8] to the signature OneOf([Exact([Utf8, Utf8]), Exact([Utf8, LargeUtf8]), Exact([LargeUtf8, Utf8]), Exact([LargeUtf8, LargeUtf8])]) failed.")
   ```
          
   I know I am missing something a bit obvious :)
   


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