Dongjoon Hyun created TAJO-1435:
-----------------------------------
Summary: Improve JDBC PreparedStatement performance
Key: TAJO-1435
URL: https://issues.apache.org/jira/browse/TAJO-1435
Project: Tajo
Issue Type: Improvement
Components: JDBC
Affects Versions: 0.10.0
Reporter: Dongjoon Hyun
Assignee: Dongjoon Hyun
Fix For: 0.11.0, 0.10.1
After my discussing with [~hyunsik] on
https://issues.apache.org/jira/browse/TAJO-1430, I create this issue.
In this issue, Tajo PreparedStatement will be upgraded by using parsed SQL
Context instead of using StringBuffer like the following.
{code:java}
private String updateSql(final String sql, HashMap<Integer, String> parameters)
{
StringBuffer newSql = new StringBuffer(sql);
int paramLoc = 1;
while (getCharIndexFromSqlByParamLocation(sql, '?', paramLoc) > 0) {
// check the user has set the needs parameters
if (parameters.containsKey(paramLoc)) {
int tt = getCharIndexFromSqlByParamLocation(newSql.toString(), '?', 1);
newSql.deleteCharAt(tt);
newSql.insert(tt, parameters.get(paramLoc));
}
paramLoc++;
}
return newSql.toString();
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)