Github user aokolnychyi commented on the issue:

    https://github.com/apache/spark/pull/19252
  
    @gatorsmile thanks for the feedback. I also covered 
``TruncateTableCommand`` with additional tests. However, I see a bit strange 
behavior while creating a test for ``AlterTableAddPartitionCommand ``.
    
    ```
    sql(s"CREATE TABLE t1 (col1 int, col2 int) USING PARQUET")
    sql(s"INSERT INTO TABLE t1 SELECT 1, 2")
    sql(s"INSERT INTO TABLE t1 SELECT 2, 4")
    sql("SELECT * FROM t1").show()
    +----+----+
    |col1|col2|
    +----+----+
    |   1|   2|
    |   2|   4|
    +----+----+
    
    sql(s"CREATE TABLE t2 (col1 int, col2 int) USING PARQUET PARTITIONED BY 
(col1)")
    sql(s"INSERT INTO TABLE t2 SELECT 1, 2")
    sql(s"INSERT INTO TABLE t2 SELECT 2, 4")
    sql("SELECT * FROM t2").show()
    +----+----+
    |col2|col1|
    +----+----+
    |   2|   4|
    |   1|   2|
    +----+----+
    ```
    
    Why are the results different? Is it a bug?


---

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

Reply via email to