Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15004#discussion_r77956188
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala 
---
    @@ -881,23 +889,30 @@ class DDLSuite extends QueryTest with 
SharedSQLContext with BeforeAndAfterEach {
         createTablePartition(catalog, part3, tableIdent)
         assert(catalog.listPartitions(tableIdent).map(_.spec).toSet ==
           Set(part1, part2, part3))
    -    sql("ALTER TABLE dbx.tab1 PARTITION (a='1', b='q') RENAME TO PARTITION 
(a='100', b='p')")
    -    sql("ALTER TABLE dbx.tab1 PARTITION (a='2', b='c') RENAME TO PARTITION 
(a='200', b='c')")
    -    assert(catalog.listPartitions(tableIdent).map(_.spec).toSet ==
    -      Set(Map("a" -> "100", "b" -> "p"), Map("a" -> "200", "b" -> "c"), 
part3))
    -    // rename without explicitly specifying database
    -    catalog.setCurrentDatabase("dbx")
    -    sql("ALTER TABLE tab1 PARTITION (a='100', b='p') RENAME TO PARTITION 
(a='10', b='p')")
    -    assert(catalog.listPartitions(tableIdent).map(_.spec).toSet ==
    -      Set(Map("a" -> "10", "b" -> "p"), Map("a" -> "200", "b" -> "c"), 
part3))
    +    if (isDatasourceTable) {
    +      convertToDatasourceTable(catalog, tableIdent)
    +    }
    +    maybeWrapException(isDatasourceTable) {
    --- End diff --
    
    nit: `maybeWrapException(expectException = isDatasourceTable)`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to