HyukjinKwon commented on a change in pull request #24605: [SPARK-27711][CORE] 
Unset InputFileBlockHolder at the end of tasks
URL: https://github.com/apache/spark/pull/24605#discussion_r284071386
 
 

 ##########
 File path: python/pyspark/sql/tests/test_functions.py
 ##########
 @@ -278,6 +279,22 @@ def test_sort_with_nulls_order(self):
             
df.select(df.name).orderBy(functions.desc_nulls_last('name')).collect(),
             [Row(name=u'Tom'), Row(name=u'Alice'), Row(name=None)])
 
+    def test_input_file_name_reset_for_rdd(self):
+        from pyspark.sql.functions import udf, input_file_name
+        rdd = 
self.sc.textFile('python/test_support/hello/hello.txt').map(lambda x: {'data': 
x})
+        df = self.spark.createDataFrame(rdd, StructType([StructField('data', 
StringType(), True)]))
 
 Review comment:
   actually, you don't have to import types:
   
   ```
   spark.createDataFrame(rdd, "data STRING")
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to