Skip to content

Commit

Permalink
Revise message when appending partition with schema mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
wenleix committed Jun 5, 2018
1 parent 6b1d2a9 commit 8c7b3a6
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,9 @@ public HiveWriter createWriter(Page partitionColumns, int position, OptionalInt
HiveType partitionType = existingPartitionColumns.get(i).getType();
if (!tableType.equals(partitionType)) {
throw new PrestoException(HIVE_PARTITION_SCHEMA_MISMATCH, format("" +
"There is a mismatch between the table and partition schemas. " +
"You are trying to write into an existing partition in a table. " +
"The table schema has changed since the creation of the partition. " +
"Inserting rows into such partition is not supported. " +
"The column '%s' in table '%s' is declared as type '%s', " +
"but partition '%s' declared column '%s' as type '%s'.",
tableColumns.get(i).getName(),
Expand Down

0 comments on commit 8c7b3a6

Please sign in to comment.