[jira] [Commented] (SPARK-21117) Built-in SQL Function Support - WIDTH_BUCKET
[ https://issues.apache.org/jira/browse/SPARK-21117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17207315#comment-17207315 ] Takeshi Yamamuro commented on SPARK-21117: -- Most databases supporting that feature? Please give me a doc for it? Btw, I think its okay to make a new ticket instead of reopening this. > Built-in SQL Function Support - WIDTH_BUCKET > > > Key: SPARK-21117 > URL: https://issues.apache.org/jira/browse/SPARK-21117 > Project: Spark > Issue Type: Sub-task > Components: SQL >Affects Versions: 2.2.0 >Reporter: Yuming Wang >Assignee: Takeshi Yamamuro >Priority: Major > Fix For: 3.1.0 > > > For a given expression, the {{WIDTH_BUCKET}} function returns the bucket > number into which the value of this expression would fall after being > evaluated. > {code:sql} > WIDTH_BUCKET (expr , min_value , max_value , num_buckets) > {code} > Ref: > https://docs.oracle.com/cd/B28359_01/olap.111/b28126/dml_functions_2137.htm#OLADM717 -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Commented] (SPARK-21117) Built-in SQL Function Support - WIDTH_BUCKET
[ https://issues.apache.org/jira/browse/SPARK-21117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17207285#comment-17207285 ] Richard Penney commented on SPARK-21117: This looks like a really useful feature - thanks. However, I notice that the third version of the postgresql with_bucket() function does not seem to have been implemented yet. This is for the, admittedly rather more subtle, case of a user-supplied array of thresholds. Have we decided that this partition-with-thresholds capability is not going to be supported, or should we consider reopening this ticket? > Built-in SQL Function Support - WIDTH_BUCKET > > > Key: SPARK-21117 > URL: https://issues.apache.org/jira/browse/SPARK-21117 > Project: Spark > Issue Type: Sub-task > Components: SQL >Affects Versions: 2.2.0 >Reporter: Yuming Wang >Assignee: Takeshi Yamamuro >Priority: Major > Fix For: 3.1.0 > > > For a given expression, the {{WIDTH_BUCKET}} function returns the bucket > number into which the value of this expression would fall after being > evaluated. > {code:sql} > WIDTH_BUCKET (expr , min_value , max_value , num_buckets) > {code} > Ref: > https://docs.oracle.com/cd/B28359_01/olap.111/b28126/dml_functions_2137.htm#OLADM717 -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Commented] (SPARK-21117) Built-in SQL Function Support - WIDTH_BUCKET
[ https://issues.apache.org/jira/browse/SPARK-21117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17162520#comment-17162520 ] Apache Spark commented on SPARK-21117: -- User 'maropu' has created a pull request for this issue: https://github.com/apache/spark/pull/29183 > Built-in SQL Function Support - WIDTH_BUCKET > > > Key: SPARK-21117 > URL: https://issues.apache.org/jira/browse/SPARK-21117 > Project: Spark > Issue Type: Sub-task > Components: SQL >Affects Versions: 2.2.0 >Reporter: Yuming Wang >Assignee: Takeshi Yamamuro >Priority: Major > Fix For: 3.1.0 > > > For a given expression, the {{WIDTH_BUCKET}} function returns the bucket > number into which the value of this expression would fall after being > evaluated. > {code:sql} > WIDTH_BUCKET (expr , min_value , max_value , num_buckets) > {code} > Ref: > https://docs.oracle.com/cd/B28359_01/olap.111/b28126/dml_functions_2137.htm#OLADM717 -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Commented] (SPARK-21117) Built-in SQL Function Support - WIDTH_BUCKET
[ https://issues.apache.org/jira/browse/SPARK-21117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17128919#comment-17128919 ] Apache Spark commented on SPARK-21117: -- User 'maropu' has created a pull request for this issue: https://github.com/apache/spark/pull/28764 > Built-in SQL Function Support - WIDTH_BUCKET > > > Key: SPARK-21117 > URL: https://issues.apache.org/jira/browse/SPARK-21117 > Project: Spark > Issue Type: Sub-task > Components: SQL >Affects Versions: 2.2.0 >Reporter: Yuming Wang >Priority: Major > > For a given expression, the {{WIDTH_BUCKET}} function returns the bucket > number into which the value of this expression would fall after being > evaluated. > {code:sql} > WIDTH_BUCKET (expr , min_value , max_value , num_buckets) > {code} > Ref: > https://docs.oracle.com/cd/B28359_01/olap.111/b28126/dml_functions_2137.htm#OLADM717 -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Commented] (SPARK-21117) Built-in SQL Function Support - WIDTH_BUCKET
[ https://issues.apache.org/jira/browse/SPARK-21117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16853736#comment-16853736 ] Yuming Wang commented on SPARK-21117: - PostgreSQL support this function: ||Function||Return Type||Description||Example||Result|| |width_bucket(operanddp, b1 dp, b2 dp, countint)|int|return the bucket number to which operand would be assigned in a histogram having count equal-width buckets spanning the range b1 to b2; returns 0 or count+1 for an input outside the range|width_bucket(5.35, 0.024, 10.06, 5)|3| |width_bucket(operandnumeric, b1 numeric, b2numeric, count int)|int|return the bucket number to which operand would be assigned in a histogram having count equal-width buckets spanning the range b1 to b2; returns 0 or count+1 for an input outside the range|width_bucket(5.35, 0.024, 10.06, 5)|3| |width_bucket(operandanyelement, thresholdsanyarray)|int|return the bucket number to which operand would be assigned given an array listing the lower bounds of the buckets; returns 0 for an input less than the first lower bound; the thresholds array must be sorted, smallest first, or unexpected results will be obtained|width_bucket(now(), array['yesterday', 'today', 'tomorrow']::timestamptz[])|2| [https://www.postgresql.org/docs/11/functions-math.html] > Built-in SQL Function Support - WIDTH_BUCKET > > > Key: SPARK-21117 > URL: https://issues.apache.org/jira/browse/SPARK-21117 > Project: Spark > Issue Type: Sub-task > Components: SQL >Affects Versions: 2.2.0 >Reporter: Yuming Wang >Priority: Major > Labels: bulk-closed > > For a given expression, the {{WIDTH_BUCKET}} function returns the bucket > number into which the value of this expression would fall after being > evaluated. > {code:sql} > WIDTH_BUCKET (expr , min_value , max_value , num_buckets) > {code} > Ref: > https://docs.oracle.com/cd/B28359_01/olap.111/b28126/dml_functions_2137.htm#OLADM717 -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Commented] (SPARK-21117) Built-in SQL Function Support - WIDTH_BUCKET
[ https://issues.apache.org/jira/browse/SPARK-21117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16051457#comment-16051457 ] Apache Spark commented on SPARK-21117: -- User 'wangyum' has created a pull request for this issue: https://github.com/apache/spark/pull/18323 > Built-in SQL Function Support - WIDTH_BUCKET > > > Key: SPARK-21117 > URL: https://issues.apache.org/jira/browse/SPARK-21117 > Project: Spark > Issue Type: Sub-task > Components: SQL >Affects Versions: 2.2.0 >Reporter: Yuming Wang > > For a given expression, the {{WIDTH_BUCKET}} function returns the bucket > number into which the value of this expression would fall after being > evaluated. > {code:sql} > WIDTH_BUCKET (expr , min_value , max_value , num_buckets) > {code} > Ref: > https://docs.oracle.com/cd/B28359_01/olap.111/b28126/dml_functions_2137.htm#OLADM717 -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org