[
https://issues.apache.org/jira/browse/DRILL-3643?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14726328#comment-14726328
]
Khurram Faraaz commented on DRILL-3643:
---------------------------------------
Verified that the RuntimeException is fixed. However, can we have the message
read this way
"NTILE only accepts positive (non-zero) integer argument"
{code}
0: jdbc:drill:schema=dfs.tmp> select col7 , col9 , ntile(0) over(order by col0)
lastVal_col9 from FEWRWSPQQ_101;
Error: FUNCTION ERROR: NTILE only accepts positive integer argument
Fragment 0:0
[Error Id: 650d44a8-73d0-4675-8c18-67609f43a962 on centos-04.qa.lab:31010]
(state=,code=0)
{code}
> NTILE(0) returns RuntimeException
> ---------------------------------
>
> Key: DRILL-3643
> URL: https://issues.apache.org/jira/browse/DRILL-3643
> Project: Apache Drill
> Issue Type: Bug
> Components: Execution - Flow
> Affects Versions: 1.2.0
> Environment: private-branch
> https://github.com/adeneche/incubator-drill/tree/new-window-funcs
> Reporter: Khurram Faraaz
> Assignee: Deneche A. Hakim
> Priority: Minor
> Labels: window_function
> Fix For: 1.2.0
>
>
> NTILE(0) returns Divide by zero error, on developers private branch
> {code}
> 0: jdbc:drill:schema=dfs.tmp> select col7 , col9 , ntile(0) over(order by
> col0) lastVal_col9 from FEWRWSPQQ_101;
> java.lang.RuntimeException: java.sql.SQLException: SYSTEM ERROR:
> ArithmeticException: / by zero
> Fragment 0:0
> [Error Id: 18d44cb4-f4f3-46eb-a69d-8ace607ef8fe on centos-03.qa.lab:31010]
> at sqlline.IncrementalRows.hasNext(IncrementalRows.java:73)
> at
> sqlline.TableOutputFormat$ResizingRowsProvider.next(TableOutputFormat.java:87)
> at sqlline.TableOutputFormat.print(TableOutputFormat.java:118)
> at sqlline.SqlLine.print(SqlLine.java:1583)
> at sqlline.Commands.execute(Commands.java:852)
> at sqlline.Commands.sql(Commands.java:751)
> at sqlline.SqlLine.dispatch(SqlLine.java:738)
> at sqlline.SqlLine.begin(SqlLine.java:612)
> at sqlline.SqlLine.start(SqlLine.java:366)
> at sqlline.SqlLine.main(SqlLine.java:259)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)