Skip to content

Commit

Permalink
0003802: Faster two-pass initial load for tables with LOB on Oracle
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Mar 11, 2019
1 parent 4c40fd1 commit ebab347
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Expand Up @@ -390,7 +390,8 @@ public String getInitialLoadTwoPassLobLengthSql(Column column, boolean isFirstPa
if (column.getJdbcTypeName().equalsIgnoreCase("LONG")) {
return isFirstPass ? "1=1" : "1=0";
} else if (isFirstPass) {
return "dbms_lob.getlength(t." + quote + column.getName() + quote + ") <= 4000";
return "(t." + quote + column.getName() + quote + " is null or " +
"dbms_lob.getlength(t." + quote + column.getName() + quote + ") <= 4000)";
}
return "dbms_lob.getlength(t." + quote + column.getName() + quote + ") > 4000";
}
Expand Down
Expand Up @@ -343,7 +343,8 @@ public boolean isInitialLoadTwoPassLob(Table table) {
public String getInitialLoadTwoPassLobLengthSql(Column column, boolean isFirstPass) {
String quote = this.platform.getDdlBuilder().getDatabaseInfo().getDelimiterToken();
if (isFirstPass) {
return "dbms_lob.getlength(t." + quote + column.getName() + quote + ") <= 4000";
return "(t." + quote + column.getName() + quote + " is null or " +
"dbms_lob.getlength(t." + quote + column.getName() + quote + ") <= 4000)";
}
return "dbms_lob.getlength(t." + quote + column.getName() + quote + ") > 4000";
}
Expand Down

0 comments on commit ebab347

Please sign in to comment.