You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Ron Serruya (Jira)" <ji...@apache.org> on 2024/06/19 14:39:00 UTC

[jira] [Created] (SPARK-48665) Support dict type for pyspark.sql.functions.lit

Ron Serruya created SPARK-48665:
-----------------------------------

             Summary: Support dict type for pyspark.sql.functions.lit
                 Key: SPARK-48665
                 URL: https://issues.apache.org/jira/browse/SPARK-48665
             Project: Spark
          Issue Type: New Feature
          Components: PySpark
    Affects Versions: 4.0.0
            Reporter: Ron Serruya


Currently, the `lit` function in pyspark doesn't accept dict in order to create maps
{noformat}
F.lit({"a":1})

pyspark.errors.exceptions.captured.SparkRuntimeException: [UNSUPPORTED_FEATURE.LITERAL_TYPE] The feature is not supported: Literal for '{asd=2}' of class java.util.HashMap.{noformat}
Support should be added, the same way that scala has with `typedLit` to allow easier creation of maps using lit



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org