[
https://issues.apache.org/jira/browse/HIVE-23307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17100295#comment-17100295
]
Hive QA commented on HIVE-23307:
--------------------------------
Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/13002086/HIVE-23307.1.patch
{color:green}SUCCESS:{color} +1 due to 1 test(s) being added or modified.
{color:green}SUCCESS:{color} +1 due to 17220 tests passed
Test results:
https://builds.apache.org/job/PreCommit-HIVE-Build/22149/testReport
Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/22149/console
Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-22149/
Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.YetusPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
{noformat}
This message is automatically generated.
ATTACHMENT ID: 13002086 - PreCommit-HIVE-Build
> Cache ColumnIndex in HiveBaseResultSet
> --------------------------------------
>
> Key: HIVE-23307
> URL: https://issues.apache.org/jira/browse/HIVE-23307
> Project: Hive
> Issue Type: New Feature
> Components: JDBC
> Affects Versions: 3.1.2
> Reporter: David Mollitor
> Assignee: David Mollitor
> Priority: Major
> Attachments: HIVE-23307.1.patch
>
>
> {code:java}
> public int findColumn(String columnName) throws SQLException {
> int columnIndex = 0;
> boolean findColumn = false;
> for (String normalizedColumnName : normalizedColumnNames) {
> ++columnIndex;
> String[] names = normalizedColumnName.split("\\.");
> String name = names[names.length -1];
> if (name.equalsIgnoreCase(columnName) ||
> normalizedColumnName.equalsIgnoreCase(columnName)) {
> findColumn = true;
> break;
> }
> }
> if (!findColumn) {
> throw new SQLException("Could not find " + columnName + " in " +
> normalizedColumnNames);
> } else {
> return columnIndex;
> }
> }
> {code}
> Cache the column name to column index map to avoid having to look it up again
> and again for each row O(n^2)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)