Skip to content

Commit

Permalink
Improve message for mismatched insert column types
Browse files Browse the repository at this point in the history
Now that types have parenthesis, use brackets in the error message.
  • Loading branch information
electrum committed Feb 10, 2016
1 parent d4874a0 commit 4342888
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -563,8 +563,8 @@ protected RelationType visitInsert(Insert insert, AnalysisContext context)
// TODO replace this workaround with injecting implicit coercions for INSERTed values.
if (!typesMatchForInsert(tableTypes, queryTypes)) {
throw new SemanticException(MISMATCHED_SET_COLUMN_TYPES, insert, "Insert query has mismatched column types: " +
"Table: (" + Joiner.on(", ").join(tableTypes) + "), " +
"Query: (" + Joiner.on(", ").join(queryTypes) + ")");
"Table: [" + Joiner.on(", ").join(tableTypes) + "], " +
"Query: [" + Joiner.on(", ").join(queryTypes) + "]");
}

return new RelationType(Field.newUnqualified("rows", BIGINT));
Expand Down

0 comments on commit 4342888

Please sign in to comment.