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

Chris Merrick commented on DRILL-20:
------------------------------------

Interesting idea, I think I do understand the end result you're going after.  
This feature also means that you could have multiple limits, right?  And 
therefore conflicting limits? 

I did some research and the only other existing query language I could find 
with a similar concept is BigQuery, where it looks like you might be able to 
accomplish this with a combination of the TOP() operator and a WITHIN clause - 
although it's not clear from the docs whether that's legal.  It's also very 
clear in the docs that the TOP operator is implemented differently than a 
regular LIMIT.

BigQuery's actual LIMIT operator seems to be restricted to only applying to the 
top-level records.

Not that the goal is to necessarily copy BigQuery exactly, but it seems like 
they went about this in a different way.  Was there any query language in 
particular that motivated you to add this?  I'm mostly just trying to get some 
insight into how you all are thinking about the language design - overall I do 
think this makes sense, but it has a few subtle complications.
                
> Limit Operator Reference Implementation
> ---------------------------------------
>
>                 Key: DRILL-20
>                 URL: https://issues.apache.org/jira/browse/DRILL-20
>             Project: Apache Drill
>          Issue Type: Improvement
>            Reporter: Chris Merrick
>         Attachments: limit-reference.patch
>
>
> Build off of Jacques work on reference implementations - the limit operator.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to