Skip to content

Commit

Permalink
Update error message to fix failing test.
Browse files Browse the repository at this point in the history
  • Loading branch information
rdblue committed Jul 24, 2019
1 parent efc4bf7 commit 8449d66
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ class AstBuilder(conf: SQLConf) extends SqlBaseBaseVisitor[AnyRef] with Logging
val dynamicPartitionKeys: Map[String, Option[String]] = partitionKeys.filter(_._2.isEmpty)
if (ctx.EXISTS != null && dynamicPartitionKeys.nonEmpty) {
operationNotAllowed("IF NOT EXISTS with dynamic partitions: " +
dynamicPartitionKeys.keys.mkString(","), ctx)
dynamicPartitionKeys.keys.mkString(", "), ctx)
}

(tableIdent, partitionKeys, ctx.EXISTS() != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,7 @@ class InsertSuite extends QueryTest with TestHiveSingleton with BeforeAndAfter
|SELECT 7, 8, 3
""".stripMargin)
}
assert(e.getMessage.contains(
"Dynamic partitions do not support IF NOT EXISTS. Specified partitions with value: [c]"))
assert(e.getMessage.contains("IF NOT EXISTS with dynamic partitions: c"))

// If the partition already exists, the insert will overwrite the data
// unless users specify IF NOT EXISTS
Expand Down

0 comments on commit 8449d66

Please sign in to comment.