wzhfy commented on a change in pull request #29589:
URL: https://github.com/apache/spark/pull/29589#discussion_r483406090



##########
File path: 
sql/core/src/test/scala/org/apache/spark/sql/DynamicPartitionPruningSuite.scala
##########
@@ -1342,6 +1345,52 @@ abstract class DynamicPartitionPruningSuiteBase
       }
     }
   }
+
+  test("SPARK-32748: propagate local properties to dynamic pruning thread") {
+    def checkPropertyValueByUdfResult(propKey: String, propValue: String): 
Unit = {
+      spark.sparkContext.setLocalProperty(propKey, propValue)
+      val df = sql(
+        s"""
+           |SELECT compare_property_value(f.date_id, '$propKey', '$propValue') 
as col

Review comment:
       Yes, IIUC udf created by `spark.udf.register` is not foldable, so it 
will be evaluated in tasks. Besides, otherwise TaskContext.get() will get null 
if it's not run in task I think.




----------------------------------------------------------------
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]



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

Reply via email to