zero323 commented on a change in pull request #35296:
URL: https://github.com/apache/spark/pull/35296#discussion_r795046654



##########
File path: python/pyspark/pandas/generic.py
##########
@@ -980,6 +983,9 @@ def to_json(
         """
         if "options" in options and isinstance(options.get("options"), dict) 
and len(options) == 1:
             options = options.get("options")
+        
+        default_options: Dict[str, Any] = {"ignoreNullFields": False}
+        options = {**default_options, **options}

Review comment:
       ```patch
   diff --git a/python/pyspark/pandas/generic.py 
b/python/pyspark/pandas/generic.py
   index c459f033f8..63ce25ec5f 100644
   --- a/python/pyspark/pandas/generic.py
   +++ b/python/pyspark/pandas/generic.py
   @@ -24,6 +24,7 @@ from functools import reduce
    from typing import (
        Any,
        Callable,
   +    Dict,
        Iterable,
        IO,
        List,
   
   ```




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