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 map_filter #5273

Closed
viadea opened this issue Apr 18, 2022 · 1 comment · Fixed by #5436
Closed

[FEA] Support map_filter #5273

viadea opened this issue Apr 18, 2022 · 1 comment · Fixed by #5436
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 Apr 18, 2022

I wish we can support map_filter function.

For example:

from pyspark.sql.types import *
from pyspark.sql.functions import *
jsonString="""{"Zipcode":704,"ZipCodeType":"STANDARD","City":"PARC PARQUE","State":"PR"}"""
df=spark.createDataFrame([(1, jsonString)],["id","value"])
df.show(truncate=False)
df2=df.withColumn("value",from_json(df.value,MapType(StringType(),StringType())))

spark.conf.set("spark.rapids.sql.regexp.enabled",True)
df3=df2.withColumn('mapfiltercol', expr(f""" map_filter(value, (k,v)  -> k rlike "Zip%"    )       """) )
df3.collect()

Not-supported-messages:

    ! <MapFilter> map_filter(from_json(MapType(StringType,StringType,true), value#12, Some(UTC)), lambdafunction(RLIKE(lambda k#70, Zip%), lambda k#70, lambda v#71, false)) cannot run on GPU because GPU does not currently support the operator class org.apache.spark.sql.catalyst.expressions.MapFilter

@viadea viadea added feature request New feature or request ? - Needs Triage Need team to review and classify labels Apr 18, 2022
@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 Apr 19, 2022
@sameerz
Copy link
Collaborator

sameerz commented Apr 19, 2022

Depends on rapidsai/cudf#10650

@sameerz sameerz changed the title [FEA]Support map_filter [FEA] Support map_filter Jun 6, 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.

3 participants