bojana-db commented on code in PR #57827:
URL: https://github.com/apache/spark/pull/57827#discussion_r3814684989


##########
python/pyspark/sql/connect/tvf.py:
##########
@@ -99,13 +99,17 @@ def sql_keywords(self) -> "DataFrame":
 
     sql_keywords.__doc__ = PySparkTableValuedFunction.sql_keywords.__doc__
 
-    def variant_explode(self, input: "Column") -> "DataFrame":
-        return self._fn("variant_explode", input)
+    def variant_explode(self, input: "Column", recursive: bool = False) -> 
"DataFrame":
+        from pyspark.sql.connect.functions.builtin import lit
+
+        return self._fn("variant_explode", input, cast("Column", 
lit(recursive)))

Review Comment:
   This makes sense. I’m not sure whether Spark Connect guarantees 
compatibility between an older server and a newer client (@cloud-fan may know), 
but preserving the existing one-argument plan for the default behavior is 
inexpensive, so I made the change.



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

To unsubscribe, e-mail: [email protected]

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