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 GroupBy Array[INT] #5096

Closed
viadea opened this issue Mar 30, 2022 · 4 comments
Closed

[FEA] Support GroupBy Array[INT] #5096

viadea opened this issue Mar 30, 2022 · 4 comments
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 Mar 30, 2022

I wish we can support GroupBy Array[INT].

For example:

import org.apache.spark.sql.types._
val arrayData = Seq(
    Row("John",List(1,2,3),1),
    Row("David",List(4,5,6),2),
    Row("Harry",List(1,2),1)
)

val arraySchema = new StructType().add("name",StringType).add("array_of_int", ArrayType(IntegerType)).add("favorite",IntegerType)

val df = spark.createDataFrame(spark.sparkContext.parallelize(arrayData),arraySchema)
df.write.mode("overwrite").format("parquet").save("/tmp/testparquet")
val df2=spark.read.parquet("/tmp/testparquet")
df2.createOrReplaceTempView("df2")

spark.sql("select array_of_int,count(*)  from df2 group by array_of_int").collect()

Not-supported messages:

  !Exec <ShuffleExchangeExec> cannot run on GPU because not all partitioning can be replaced; Columnar exchange without columnar children is inefficient
    !Partitioning <HashPartitioning> cannot run on GPU because hash_key expression AttributeReference array_of_int#54 (ArrayType(IntegerType,true) is not supported)
      @Expression <AttributeReference> array_of_int#54 could run on GPU
    !Exec <HashAggregateExec> cannot run on GPU because ArrayTypes or MapTypes in grouping expressions are not supported
@viadea viadea added feature request New feature or request ? - Needs Triage Need team to review and classify labels Mar 30, 2022
@ttnghia
Copy link
Collaborator

ttnghia commented Apr 3, 2022

This is similar to #4656. Generic support for groupby with lists as keys needs much more work and I don't think we will have it in the very near future.

@sameerz sameerz added the cudf_dependency An issue or PR with this label depends on a new feature in cudf label Apr 4, 2022
@sameerz
Copy link
Collaborator

sameerz commented Apr 4, 2022

Depends on rapidsai/cudf#8039

@mattahrens mattahrens removed the ? - Needs Triage Need team to review and classify label Apr 5, 2022
@sameerz
Copy link
Collaborator

sameerz commented May 10, 2022

Depends on adding murmur3 hashing for list columns issue rapidsai/cudf#10378

@razajafri
Copy link
Collaborator

Fixed as part of #6066

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

No branches or pull requests

5 participants