Skip to content

Commit

Permalink
0002868: Fix really bad error message when a transform transforms a
Browse files Browse the repository at this point in the history
table name to a name that doesn't exist and the original name does
  • Loading branch information
chenson42 committed Oct 19, 2016
1 parent e35fbdd commit d9d48c0
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,15 @@ public void write(CsvData data) {
}
} else {
context.put(CONFLICT_ERROR, null);
if (data.requiresTable()
&& (targetTable == null && data.getDataEventType() != DataEventType.SQL)) {
// if we cross batches and the table isn't specified, then
// use the last table we used
start(context.getLastParsedTable());
if (data.requiresTable() && sourceTable != null
&& targetTable == null && data.getDataEventType() != DataEventType.SQL ) {
Table lastTable = context.getLastParsedTable();
if (lastTable != null
&& lastTable.getFullyQualifiedTableNameLowerCase().equals(sourceTable.getFullyQualifiedTableNameLowerCase())) {
// if we cross batches and the table isn't specified, then
// use the last table we used
start(lastTable);
}
}
if (targetTable != null || !data.requiresTable()
|| (targetTable == null && data.getDataEventType() == DataEventType.SQL)) {
Expand Down

0 comments on commit d9d48c0

Please sign in to comment.