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/28 12:39:59 UTC

[GitHub] [arrow-datafusion] mustafasrepo opened a new issue, #4403: Add support for NTILE built-in Window Function

mustafasrepo opened a new issue, #4403:
URL: https://github.com/apache/arrow-datafusion/issues/4403

   
   **Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
   
   Currently, there is no support for `NTILE` queries. When we run the query below
   
   ```sql
   SELECT
   NTILE(10) OVER (ORDER BY C12) as ntile1,
   NTILE(20) OVER (ORDER BY C12 DESC) as ntile2
   FROM aggregate_test_100
   ORDER BY C9
   LIMIT 5
   ```
   
   we get the error `called Result::unwrap() on an Err value: "Plan(\"Coercion from [Int64] to the signature Exact([UInt64]) failed.\")` . I want support for queries involving `NTILE`.
   
   **Describe the solution you'd like**
   
   We should add an implementation for `NTILE` function first then, we should select the implementation during built-in window function creation in the [link](https://github.com/apache/arrow-datafusion/blob/fe8aee6730e503fd898ade2bef92791fe61411a4/datafusion/core/src/physical_plan/windows/mod.rs#L97). (For NTILE we will get not yet implemented error.). NTILE implementation can be done by extending ROW_NUMBER implementation in the [link](https://github.com/apache/arrow-datafusion/blob/master/datafusion/physical-expr/src/window/row_number.rs)
   
   **Describe alternatives you've considered**
   
   N.A
   
   **Additional context**
   
   It seems that (the error above indicates) there is also an issue during the parsing of the `NTILE` argument, hence the addition of `NTILE` functionality may require changing some other codes.


-- 
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.apache.org

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


[GitHub] [arrow-datafusion] alamb closed issue #4403: Add support for NTILE built-in Window Function

Posted by GitBox <gi...@apache.org>.
alamb closed issue #4403: Add support for NTILE built-in Window Function
URL: https://github.com/apache/arrow-datafusion/issues/4403


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