Skip to content

Commit

Permalink
0002290: Postgres bulk writer throws a null pointer error versus logg…
Browse files Browse the repository at this point in the history
…ing what is going on when the target table cannot be found
  • Loading branch information
chenson42 committed May 2, 2015
1 parent 6782274 commit 80e3a09
Showing 1 changed file with 12 additions and 6 deletions.
Expand Up @@ -175,12 +175,18 @@ protected void endCopy() {
@Override
public boolean start(Table table) {
if (super.start(table)) {
needsBinaryConversion = false;
if (!batch.getBinaryEncoding().equals(BinaryEncoding.NONE)) {
for (Column column : targetTable.getColumns()) {
if (column.isOfBinaryType()) {
needsBinaryConversion = true;
break;
/* If target table cannot be found the write method will decide
* whether to ignore the write request or to log an error. No
* need to report the error right now.
*/
if (targetTable != null) {
needsBinaryConversion = false;
if (!batch.getBinaryEncoding().equals(BinaryEncoding.NONE)) {
for (Column column : targetTable.getColumns()) {
if (column.isOfBinaryType()) {
needsBinaryConversion = true;
break;
}
}
}
}
Expand Down

0 comments on commit 80e3a09

Please sign in to comment.