Skip to content
Permalink
Browse files

0003802: Faster two-pass initial load for tables with LOB on Oracle

  • Loading branch information...
erilong committed Mar 11, 2019
1 parent 4c40fd1 commit ebab347801d7822ed63ee115c3a2c196483900c0
@@ -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";
}
@@ -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";
}

0 comments on commit ebab347

Please sign in to comment.
You can’t perform that action at this time.