spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hyukjin Kwon (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SPARK-28153) Use AtomicReference at InputFileBlockHolder (to support input_file_name with Python UDF)
Date Thu, 01 Aug 2019 05:20:00 GMT

     [ https://issues.apache.org/jira/browse/SPARK-28153?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Hyukjin Kwon updated SPARK-28153:
---------------------------------
    Fix Version/s:     (was: 3.0.0)

> Use AtomicReference at InputFileBlockHolder (to support input_file_name with Python UDF)
> ----------------------------------------------------------------------------------------
>
>                 Key: SPARK-28153
>                 URL: https://issues.apache.org/jira/browse/SPARK-28153
>             Project: Spark
>          Issue Type: Bug
>          Components: PySpark
>    Affects Versions: 2.3.3, 3.0.0, 2.4.3
>            Reporter: Hyukjin Kwon
>            Priority: Major
>
> {code}
> from pyspark.sql.functions import udf, input_file_name
> spark.range(10).write.mode("overwrite").parquet("/tmp/foo")
> spark.read.parquet("/tmp/foo").select(udf(lambda x: x, "long")("id"), input_file_name()).show()
> {code}
> {code}
> +------------+-----------------+
> |<lambda>(id)|input_file_name()|
> +------------+-----------------+
> |           8|                 |
> |           5|                 |
> |           0|                 |
> |           9|                 |
> |           6|                 |
> |           2|                 |
> |           3|                 |
> |           4|                 |
> |           7|                 |
> |           1|                 |
> +------------+-----------------+
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

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


Mime
View raw message