Skip to content

Commit

Permalink
0001278: The IDatabaseWriterFilter should always be passed the source…
Browse files Browse the repository at this point in the history
… table, not the target table
  • Loading branch information
chenson42 committed Jun 13, 2013
1 parent ebd5e3d commit 08092ee
Showing 1 changed file with 2 additions and 4 deletions.
Expand Up @@ -368,8 +368,7 @@ protected boolean filterBefore(CsvData data) {
try {
statistics.get(batch).startTimer(DataWriterStatisticConstants.FILTERMILLIS);
for (IDatabaseWriterFilter filter : filters) {
process &= filter.beforeWrite(this.context,
this.targetTable != null ? this.targetTable : this.sourceTable, data);
process &= filter.beforeWrite(this.context, this.sourceTable, data);
}
} finally {
statistics.get(batch).stopTimer(DataWriterStatisticConstants.FILTERMILLIS);
Expand Down Expand Up @@ -440,8 +439,7 @@ protected void filterAfter(CsvData data) {
try {
statistics.get(batch).startTimer(DataWriterStatisticConstants.FILTERMILLIS);
for (IDatabaseWriterFilter filter : filters) {
filter.afterWrite(this.context, this.targetTable != null ? this.targetTable
: this.sourceTable, data);
filter.afterWrite(this.context, this.sourceTable, data);
}
} finally {
statistics.get(batch).stopTimer(DataWriterStatisticConstants.FILTERMILLIS);
Expand Down

0 comments on commit 08092ee

Please sign in to comment.