[ 
https://issues.apache.org/jira/browse/DRILL-777?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Krystal closed DRILL-777.
-------------------------

Close as won't fix as drill do not support % modulo function.

> Parse error for modulo function "%" 
> ------------------------------------
>
>                 Key: DRILL-777
>                 URL: https://issues.apache.org/jira/browse/DRILL-777
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: SQL Parser
>    Affects Versions: Future
>            Reporter: Krystal
>             Fix For: Future
>
>
> git.commit.id.abbrev=70fab8c
> 0: jdbc:drill:schema=dfs> select (age%rownum) from voter where voter_id=10;
> Query failed: org.apache.drill.exec.rpc.RpcException: Remote failure while 
> running query.[error_id: "f1e9fcef-57f0-4d60-ab57-b5b73b33ee1c"
> endpoint {
>   address: "qa-node64.qa.lab"
>   user_port: 31010
>   control_port: 31011
>   data_port: 31012
> }
> error_type: 0
> message: "Failure while parsing sql. < SqlParseException:[ Lexical error at 
> line 1, column 12.  Encountered: "%" (37), after : "" ] < TokenMgrError:[ 
> Lexical error at line 1, column 12.  Encountered: "%" (37), after : "" ]"
> ]
> Stack trace:
> org.apache.drill.exec.planner.sql.parser.impl.TokenMgrError: Lexical error at 
> line 1, column 12.  Encountered: "%" (37), after : ""
> org.apache.drill.exec.planner.sql.parser.impl.DrillParserImplTokenManager.getNextToken(DrillParserImplTokenManager.java:13785)
>  
> ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.jj_scan_token(DrillParserImpl.java:16417)
>  
> ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.jj_3_300(DrillParserImpl.java:15265)
>  
> ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.jj_3R_42(DrillParserImpl.java:15275)
>  
> ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.jj_3_376(DrillParserImpl.java:11721)
>  
> ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.jj_3R_83(DrillParserImpl.java:11738)
>  
> ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.jj_3R_124(DrillParserImpl.java:12018)
>  
> ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.jj_3R_114(DrillParserImpl.java:11190)
>  
> ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.jj_3R_74(DrillParserImpl.java:11342)
>  
> ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.jj_3_199(DrillParserImpl.java:11896)
>  
> ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.jj_3R_69(DrillParserImpl.java:11879)
>  
> ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.jj_3R_70(DrillParserImpl.java:12291)
>  
> ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.jj_3R_25(DrillParserImpl.java:12380)
>  
> ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.jj_3_169(DrillParserImpl.java:12469)
>  
> ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.jj_2_169(DrillParserImpl.java:6391)
>  
> ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.LeafQueryOrExpr(DrillParserImpl.java:2386)
>  
> ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.QueryOrExpr(DrillParserImpl.java:2309)
>  
> ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.OrderedQueryOrExpr(DrillParserImpl.java:436)
>  
> ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.ParenthesizedQueryOrCommaList(DrillParserImpl.java:594)
>  
> ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.Expression3(DrillParserImpl.java:2633)
>  
> ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.Expression2(DrillParserImpl.java:2433)
>  
> ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.Expression(DrillParserImpl.java:2405)
>  
> ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.SelectExpression(DrillParserImpl.java:1464)
>  
> ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.SelectItem(DrillParserImpl.java:1424)
>  
> ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.SelectList(DrillParserImpl.java:1400)
>  
> ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.SqlSelect(DrillParserImpl.java:989)
>  
> ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.LeafQuery(DrillParserImpl.java:518)
>  
> ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.LeafQueryOrExpr(DrillParserImpl.java:2390)
>  
> ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.QueryOrExpr(DrillParserImpl.java:2309)
>  
> ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.OrderedQueryOrExpr(DrillParserImpl.java:436)
>  
> ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.SqlStmt(DrillParserImpl.java:694)
>  
> ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.SqlStmtEof(DrillParserImpl.java:736)
>  
> ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.planner.sql.parser.impl.DrillParserImpl.parseSqlStmtEof(DrillParserImpl.java:123)
>  
> ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.eigenbase.sql.parser.SqlParser.parseStmt(SqlParser.java:143) 
> ~[optiq-core-0.7-20140513.013236-5.jar:na]
> net.hydromatic.optiq.prepare.PlannerImpl.parse(PlannerImpl.java:164) 
> ~[optiq-core-0.7-20140513.013236-5.jar:na]
> org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:112)
>  
> ~[drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:338) 
> [drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:186) 
> [drill-java-exec-1.0.0-m2-incubating-SNAPSHOT-rebuffed.jar:1.0.0-m2-incubating-SNAPSHOT]
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>  [na:1.7.0_45]
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>  [na:1.7.0_45]
> java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to