Skip to content

Commit

Permalink
Improves error message when conflicting partition columns are found
Browse files Browse the repository at this point in the history
  • Loading branch information
liancheng committed Jun 23, 2015
1 parent d96d7b5 commit a935eb8
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,13 @@ private[sql] object PartitioningUtils {
Seq.empty
} else {
assert(distinctPartitionsColNames.size == 1, {
val list = distinctPartitionsColNames.mkString("\t", "\n\t", "")
s"Conflicting partition column names detected:\n$list"
val list = distinctPartitionsColNames.map(_.mkString(", ")).zipWithIndex.map {
case (names, index) =>
s"\tPartition column name list #$index: $names"
}

s"Conflicting partition column names detected:\n${list.mkString("\n")}\n" +
"For partitioned table directories, data files should only live in leaf directories."
})

// Resolves possible type conflicts for each column
Expand Down

0 comments on commit a935eb8

Please sign in to comment.