New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Window Function: ntile(num_buckets integer) [CORE3618] #3971
Comments
Modified by: Sean Leyne (seanleyne)assignee: Adriano dos Santos Fernandes [ asfernandes ] |
Modified by: @asfernandesstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 4.0 Alpha 1 [ 10731 ] |
Commented by: @pavel-zotov Should NTILE() allow to use EXPRESSION or only literal ? DDL: Now try: select id,x,ntile( 2+3 )over(order by http://t.id) from test t order by http://t.id,t.x; Statement failed, SQLSTATE = 42000 select id,x,ntile( (2+5)/3 )over(order by http://t.id) from test t order by http://t.id,t.x; Statement failed, SQLSTATE = 42000 PS. MS SQL works fine with such query (i.e. when argument for ntile is expression). |
Commented by: @pavel-zotov PS. select x,y,ntile(2.718)over(order by x,y) from test order by x,y; - should this raise error about positive int/bigint as the only allowed type ? (MS SQL "The function 'ntile' takes only a positive int or bigint expression as its input.") |
Commented by: @asfernandes Pavel, I committed inprovements: 01c131b Not everything can be in the NTILE parameter. I did now what the sql spec. says. |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] QA Status: Deferred => Done successfully |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: Sean Leyne (seanleyne)
Jira_subtask_inward CORE1688
Votes: 1
Commits: 01c131b 0bd8fd6
The text was updated successfully, but these errors were encountered: