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

[FEA] Support approx_percentile in reduction context #4734

Closed
viadea opened this issue Feb 9, 2022 · 1 comment · Fixed by #4961
Closed

[FEA] Support approx_percentile in reduction context #4734

viadea opened this issue Feb 9, 2022 · 1 comment · Fixed by #4961
Assignees
Labels
cudf_dependency An issue or PR with this label depends on a new feature in cudf feature request New feature or request

Comments

@viadea
Copy link
Collaborator

viadea commented Feb 9, 2022

I wish approx_percentile can be supported in reduction context.
For example:

spark.conf.set("spark.rapids.sql.incompatibleOps.enabled",true)
val data = Seq((1,"abc.com"),(2,"...abc"),(3,".a.b.c"))
import spark.implicits._
val df = data.toDF("id","txt")
df.write.mode("overwrite").format("parquet").save("/tmp/testparquet")
val df2=spark.read.parquet("/tmp/testparquet")
df2.createOrReplaceTempView("df2")
spark.sql("select approx_percentile(id,0.75) from df2").show()

Not-supported-messages:

    !Exec <ObjectHashAggregateExec> cannot run on GPU because not all expressions can be replaced. The data type of following expressions will be converted in GPU runtime: buf#65: Converted BinaryType to StructType(StructField(centroids,ArrayType(StructType(StructField(mean,DoubleType,false), StructField(weight,DoubleType,false)),false),true), StructField(min,DoubleType,false), StructField(max,DoubleType,false))
      @Expression <AggregateExpression> partial_approx_percentile(id#54, 0.75, 10000, 0, 0) AS buf#65 could run on GPU
        !Expression <ApproximatePercentile> approx_percentile(id#54, 0.75, 10000, 0, 0) cannot run on GPU because accuracy expression Literal 10000 (IntegerType is not supported); percentage expression Literal 0.75 (DoubleType is not supported); expression ApproximatePercentile approx_percentile(id#54, 0.75, 10000, 0, 0) produces an unsupported type IntegerType; input expression AttributeReference id#54 (IntegerType is not supported)
@viadea viadea added feature request New feature or request ? - Needs Triage Need team to review and classify labels Feb 9, 2022
@ttnghia
Copy link
Collaborator

ttnghia commented Feb 9, 2022

This depends on cudf, which in turn requires additional implementation. Reduction and groupby can share common code but not the same.

@sameerz sameerz added cudf_dependency An issue or PR with this label depends on a new feature in cudf and removed ? - Needs Triage Need team to review and classify labels Feb 9, 2022
@andygrove andygrove added this to the Feb 28 - Mar 11 milestone Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cudf_dependency An issue or PR with this label depends on a new feature in cudf feature request New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants