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 Like with non-literal value #5403

Open
viadea opened this issue Apr 29, 2022 · 1 comment
Open

[FEA] Support Like with non-literal value #5403

viadea opened this issue Apr 29, 2022 · 1 comment
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 29, 2022

I wish we can support like function with non-literal value.
For example:

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

df2.withColumn('newcol', expr(f""" map_filter(value, (k,v)  -> v like concat(k, "abc")    )       """) ).collect()

Not-supported-messages:

!Expression <Like> lambda v#200 LIKE concat(lambda k#199, abc) cannot run on GPU because search only supports StringType if it is a literal value
@viadea viadea added feature request New feature or request ? - Needs Triage Need team to review and classify labels Apr 29, 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 May 3, 2022
@revans2
Copy link
Collaborator

revans2 commented May 5, 2022

I filed rapidsai/cudf#10797 for this.

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

3 participants