Skip to content
Permalink
Browse files

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

  • Loading branch information...
erilong committed Dec 5, 2018
1 parent e04c07b commit 6aa39c620241a5b7e78a870049f37f5bb46ce8a9
@@ -865,9 +865,15 @@ public boolean isInitialLoadTwoPassLob(Table table) {
public String getInitialLoadTwoPassLobSql(String sql, Table table, boolean isFirstPass) {
List<Column> columns = table.getLobColumns(this.platform);
boolean isFirstColumn = true;
sql = sql == null ? "" : sql;
String orderBySql = "";
int index = sql.toUpperCase().indexOf("ORDER BY");
if (index != -1) {
orderBySql = " " + sql.substring(index);
sql = sql.substring(0, index);
}

if (columns.size() > 0) {
sql = sql == null ? "" : sql;
if (!sql.equals("")) {
sql += " and ";
}
@@ -890,6 +896,7 @@ public String getInitialLoadTwoPassLobSql(String sql, Table table, boolean isFir
if (columns.size() > 0) {
sql += ")";
}
sql += orderBySql;
return sql;
}

0 comments on commit 6aa39c6

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