Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Approx percentile query fails with UnsupportedOperationException #5159

Closed
andygrove opened this issue Apr 7, 2022 · 1 comment · Fixed by #5160
Closed

[BUG] Approx percentile query fails with UnsupportedOperationException #5159

andygrove opened this issue Apr 7, 2022 · 1 comment · Fixed by #5160
Assignees
Labels
bug Something isn't working

Comments

@andygrove
Copy link
Contributor

Describe the bug
Executing an approx_percentile query against a single row of input and with no group by clause causes an UnsupportedOperationException.

Steps/Code to reproduce bug

from pyspark.sql.types import *
schema = StructType([StructField("byteF", ByteType()), StructField("shortF", ShortType())])
data =[(1, 2)]
df = spark.createDataFrame(data, schema)
df.createOrReplaceTempView("t")
spark.conf.set("spark.rapids.sql.expression.ApproximatePercentile", "true")
spark.sql("SELECT approx_percentile(byteF, 0.75) FROM t").show()

Fails with:

java.lang.UnsupportedOperationException: approx_percentile does not support reduction
	at com.nvidia.spark.rapids.GpuApproximatePercentile.initialValues$lzycompute(GpuApproximatePercentile.scala:69)

Expected behavior
Should not fail.

Environment details (please complete the following information)
Spark 3.1.1 local mode

Additional context
None

@andygrove andygrove added bug Something isn't working ? - Needs Triage Need team to review and classify labels Apr 7, 2022
@andygrove andygrove added this to the Apr 4 - Apr 15 milestone Apr 7, 2022
@andygrove andygrove self-assigned this Apr 7, 2022
@sameerz sameerz removed the ? - Needs Triage Need team to review and classify label Apr 11, 2022
@GaryShen2008
Copy link
Collaborator

Correct the project to 22.04.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants