beliefer commented on a change in pull request #32963:
URL: https://github.com/apache/spark/pull/32963#discussion_r655827199



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala
##########
@@ -597,7 +597,8 @@ class Dataset[T] private[sql](
    * @group basic
    * @since 1.6.0
    */
-  def isLocal: Boolean = logicalPlan.isInstanceOf[LocalRelation]
+  def isLocal: Boolean = logicalPlan.isInstanceOf[LocalRelation] ||
+    logicalPlan.isInstanceOf[CommandResult]

Review comment:
       Thank you for reminder.

##########
File path: sql/core/src/test/scala/org/apache/spark/sql/DataFrameSuite.scala
##########
@@ -2907,6 +2907,15 @@ class DataFrameSuite extends QueryTest
       }
     }
   }
+
+  test("isLocal should consider CommandResult and LocalRelation") {
+    withTable("t1") {
+      val df = sql("CREATE TABLE t USING PARQUET AS SELECT 1 as a")

Review comment:
       OK




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