HyukjinKwon commented on code in PR #42513:
URL: https://github.com/apache/spark/pull/42513#discussion_r1302313324


##########
python/pyspark/sql/dataframe.py:
##########
@@ -3912,16 +3912,29 @@ def union(self, other: "DataFrame") -> "DataFrame":
         >>> df2 = spark.createDataFrame([(3, "Charlie"), (4, "Dave")], ["id", 
"name"])
         >>> df1 = df1.withColumn("age", lit(30))
         >>> df2 = df2.withColumn("age", lit(40))
-        >>> df3 = df1.union(df2)
-        >>> df3.show()
-        +-----+-------+---+
-        | name|     id|age|
-        +-----+-------+---+
-        |Alice|      1| 30|
-        |  Bob|      2| 30|
-        |    3|Charlie| 40|
-        |    4|   Dave| 40|
-        +-----+-------+---+
+        >>> if spark.conf.get("spark.sql.ansi.enabled") == "false":

Review Comment:
   Can we fix the input types, for example, floats and ints so it can pass 
whether `spark.sql.ansi.enabled` is on or off?



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