dongjoon-hyun 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_r284970207
########## 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)])) + df.select(input_file_name().alias('file')).collect() + + non_file_df = self.spark.range(0, 100, 1, 100).select(input_file_name().alias('file')) + + results = non_file_df.collect() + self.assertTrue(len(results) == 100) + + # [SC-12160]: if everything was properly reset after the last job, this should return Review comment: +1 for @HyukjinKwon 's comment. Is this the internal issue tracker ID? Could you update the PR, @jose-torres ? ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org