Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19545#discussion_r146096038
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala 
---
    @@ -2202,56 +2202,64 @@ abstract class DDLSuite extends QueryTest with 
SQLTestUtils {
         }
       }
     
    +  def testAddColumn(provider: String): Unit = {
    +    withTable("t1") {
    +      sql(s"CREATE TABLE t1 (c1 int) USING $provider")
    +      sql("INSERT INTO t1 VALUES (1)")
    +      sql("ALTER TABLE t1 ADD COLUMNS (c2 int)")
    +      checkAnswer(
    +        spark.table("t1"),
    +        Seq(Row(1, null))
    +      )
    +      checkAnswer(
    +        sql("SELECT * FROM t1 WHERE c2 is null"),
    +        Seq(Row(1, null))
    +      )
    +
    +      sql("INSERT INTO t1 VALUES (3, 2)")
    +      checkAnswer(
    +        sql("SELECT * FROM t1 WHERE c2 = 2"),
    +        Seq(Row(3, 2))
    +      )
    +    }
    +  }
    +
    +  def testAddColumnPartitioned(provider: String): Unit = {
    --- End diff --
    
    Nit: `protected`


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to