You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
I wish we can support map_filter function.
For example:
Not-supported-messages:
The text was updated successfully, but these errors were encountered: