Kimahriman commented on a change in pull request #32338:
URL: https://github.com/apache/spark/pull/32338#discussion_r619831270



##########
File path: 
sql/core/src/test/scala/org/apache/spark/sql/ColumnExpressionSuite.scala
##########
@@ -1686,6 +1686,61 @@ class ColumnExpressionSuite extends QueryTest with 
SharedSparkSession {
       StructType(Seq(StructField("a", IntegerType, nullable = true))))
   }
 
+  test("SPARK-35213: chained withField operations should have correct schema 
for new columns") {
+    val df = spark.createDataFrame(
+      sparkContext.parallelize(Row(null) :: Nil),
+      StructType(Seq(StructField("data", NullType))))

Review comment:
       Is it possible to just create an empty dataframe with no columns in 
Scala? I mostly operate and python and can just do `spark.createDataFrame([[]])`




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

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