You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "Yikf (via GitHub)" <gi...@apache.org> on 2023/04/10 12:51:07 UTC

[GitHub] [spark] Yikf commented on a diff in pull request #40699: [SPARK-43063][SQL] `df.show` handle null should print NULL instead of null

Yikf commented on code in PR #40699:
URL: https://github.com/apache/spark/pull/40699#discussion_r1161694829


##########
python/pyspark/sql/column.py:
##########
@@ -304,7 +304,7 @@ def __ne__(  # type: ignore[override]
     |(value = foo)|(value <=> foo)|(value <=> NULL)|
     +-------------+---------------+----------------+
     |         true|           true|           false|
-    |         null|          false|            true|
+    |         NULL|          false|            true|

Review Comment:
   Do you mean as follows? It looks consistent with inner struct fields
   
   spark-sql CLI
   ``` shell
   spark-sql> select array(1, null);
   [1,null]
   ```
   
   df.show
   ```shell
   spark.sql("select array(1,null)").show
   +--------------+
   |array(1, NULL)|
   +--------------+
   |     [1, null]|
   +--------------+
   ```



-- 
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-unsubscribe@spark.apache.org

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


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