[ 
https://issues.apache.org/jira/browse/HIVE-18268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16290040#comment-16290040
 ] 

Hive QA commented on HIVE-18268:
--------------------------------



Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12901861/HIVE-18268.patch

{color:red}ERROR:{color} -1 due to build exiting with an error

Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/8224/testReport
Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/8224/console
Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-8224/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Tests exited with: NonZeroExitCodeException
Command 'bash /data/hiveptest/working/scratch/source-prep.sh' failed with exit 
status 1 and output '+ date '+%Y-%m-%d %T.%3N'
2017-12-13 22:21:56.390
+ [[ -n /usr/lib/jvm/java-8-openjdk-amd64 ]]
+ export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
+ JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
+ export 
PATH=/usr/lib/jvm/java-8-openjdk-amd64/bin/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
+ 
PATH=/usr/lib/jvm/java-8-openjdk-amd64/bin/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
+ export 'ANT_OPTS=-Xmx1g -XX:MaxPermSize=256m '
+ ANT_OPTS='-Xmx1g -XX:MaxPermSize=256m '
+ export 'MAVEN_OPTS=-Xmx1g '
+ MAVEN_OPTS='-Xmx1g '
+ cd /data/hiveptest/working/
+ tee /data/hiveptest/logs/PreCommit-HIVE-Build-8224/source-prep.txt
+ [[ false == \t\r\u\e ]]
+ mkdir -p maven ivy
+ [[ git = \s\v\n ]]
+ [[ git = \g\i\t ]]
+ [[ -z master ]]
+ [[ -d apache-github-source-source ]]
+ [[ ! -d apache-github-source-source/.git ]]
+ [[ ! -d apache-github-source-source ]]
+ date '+%Y-%m-%d %T.%3N'
2017-12-13 22:21:56.394
+ cd apache-github-source-source
+ git fetch origin
+ git reset --hard HEAD
HEAD is now at 8ab523b HIVE-18241: Query with LEFT SEMI JOIN producing wrong 
result (Vineet Garg, reviewed by Jesus Camacho Rodriguez)
+ git clean -f -d
+ git checkout master
Already on 'master'
Your branch is up-to-date with 'origin/master'.
+ git reset --hard origin/master
HEAD is now at 8ab523b HIVE-18241: Query with LEFT SEMI JOIN producing wrong 
result (Vineet Garg, reviewed by Jesus Camacho Rodriguez)
+ git merge --ff-only origin/master
Already up-to-date.
+ date '+%Y-%m-%d %T.%3N'
2017-12-13 22:22:02.189
+ rm -rf ../yetus
rm: cannot remove ?../yetus/itests?: Directory not empty
+ exit 1
'
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12901861 - PreCommit-HIVE-Build

> Hive Prepared Statement when split with double quoted in query fails
> --------------------------------------------------------------------
>
>                 Key: HIVE-18268
>                 URL: https://issues.apache.org/jira/browse/HIVE-18268
>             Project: Hive
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 2.3.2
>            Reporter: Choi JaeHwan
>            Assignee: Choi JaeHwan
>             Fix For: 2.3.3
>
>         Attachments: HIVE-18268.patch
>
>
> HIVE-13625, Change sql statement split when odd number of escape characters, 
> and add parameter counter validation, above 
> {code:java}
> // prev code
>     StringBuilder newSql = new StringBuilder(parts.get(0));
>     for(int i=1;i<parts.size();i++){
>       if(!parameters.containsKey(i)){
>         throw new SQLException("Parameter #"+i+" is unset");
>       }
>       newSql.append(parameters.get(i));
>       newSql.append(parts.get(i));
>     }
> // change from HIVE-13625
>     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++;
>     }
> {code}
> If the number of split SQL and the number of parameters are not matched, an 
> SQLException is thrown
> Currently, when splitting SQL, there is no processing for double quoted, and 
> when the token ('?' ) is between double quote, SQL is split.
> i think when the token between double quoted is literal, it is correct to not 
> split.
> for example, above the query;
> {code:java}
> // Some comments here
> 1:  String query =  " select 1 from x where qa="?" "
> 2:  String query = " SELECT 1 FROM `x` WHERE (trecord LIKE "ALA[d_?]%")
> {code}
> ? is literal, then query do not split. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to