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/08/15 11:26:00 UTC

[GitHub] [arrow-datafusion] Ted-Jiang opened a new issue, #3145: Support number of histogram bins in approx_percentile_cont

Ted-Jiang opened a new issue, #3145:
URL: https://github.com/apache/arrow-datafusion/issues/3145

   **Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
   like hive 
   ```
   @Description(name = "percentile_approx",
       value = "_FUNC_(expr, pc, [nb]) - For very large data, computes an approximate percentile " +
               "value from a histogram, using the optional argument [nb] as the number of histogram" +
               " bins to use. A higher value of nb results in a more accurate approximation, at " +
               "the cost of higher memory usage.",
       extended = "'expr' can be any numeric column, including doubles and floats, and 'pc' is " +
                  "either a single double/float with a requested percentile, or an array of double/" +
                  "float with multiple percentiles. If 'nb' is not specified, the default " +
                  "approximation is done with 10,000 histogram bins, which means that if there are " +
                  "10,000 or fewer unique values in 'expr', you can expect an exact result. The " +
                  "percentile() function always computes an exact percentile and can run out of " +
                  "memory if there are too many unique values in a column, which necessitates " +
                  "this function.\n" +
                  "Example (three percentiles requested using a finer histogram approximation):\n" +
                  "> SELECT percentile_approx(val, array(0.5, 0.95, 0.98), 100000) FROM somedata;\n" +
                  "[0.05,1.64,2.26]\n")
   ```
   Need add args max_size of tdigest(aka histogram bins) in approx_percentile_cont,
   when calculate large amount data we need more sample points to keep accuracy.
   
   **Describe the solution you'd like**
   A clear and concise description of what you want to happen.
   
   **Describe alternatives you've considered**
   A clear and concise description of any alternative solutions or features you've considered.
   
   **Additional context**
   Add any other context or screenshots about the feature request here.
   


-- 
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 #3145: Support number of histogram bins in approx_percentile_cont

Posted by GitBox <gi...@apache.org>.
alamb closed issue #3145: Support number of histogram bins in approx_percentile_cont
URL: https://github.com/apache/arrow-datafusion/issues/3145


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