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

Andrew commented on DRILL-3869:
-------------------------------

The SqlLine code is simply trimming whitespace and checking for a trailing ';'. 
 From SqlLine.java:

1192     final char[] chars = line.toCharArray();
1193     int n = chars.length;
1194 
1195     // Trim off trailing semicolon and/or whitespace
1196     while (n > 0
1197         && (Character.isWhitespace(chars[n - 1])
1198         || chars[n - 1] == ';')) {
1199       --n;
1200     }

It will be easy enough to add this to the REST server code, but I wonder if it 
would be better to add it to DrillClient instead so that we catch all 
compound-query submissions. Does anyone have a strong opinion about the best 
place to add the check?

> Trailing semicolon causes web UI to fail
> ----------------------------------------
>
>                 Key: DRILL-3869
>                 URL: https://issues.apache.org/jira/browse/DRILL-3869
>             Project: Apache Drill
>          Issue Type: Bug
>    Affects Versions: 1.1.0
>            Reporter: Andrew
>            Assignee: Andrew
>             Fix For: 1.2.0
>
>
> When submitting a query through the web UI, if the user types in a trailing 
> ';' the query will fail with the error message: 
> org.apache.drill.common.exceptions.UserRemoteException: PARSE ERROR: 
> Encountered ";" at line 1, column 42. Was expecting one of: "OFFSET" ... 
> "FETCH" ... 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to