harshmotw-db commented on code in PR #49591:
URL: https://github.com/apache/spark/pull/49591#discussion_r1925867531


##########
python/pyspark/sql/types.py:
##########
@@ -1478,6 +1478,9 @@ def toInternal(self, obj: Tuple) -> Tuple:
         if obj is None:
             return
 
+        if isinstance(obj, VariantVal):
+            raise PySparkValueError("Rows cannot be of type VariantVal")

Review Comment:
   I presume you could use a similar technique for other data types. I'm not 
trying to block them in this PR because that could potentially be a breaking 
change. So could this Variant-related change but Variant is a new feature and 
PySpark received parseJson support [very 
recently](https://github.com/apache/spark/pull/49450).



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to