vogievetsky opened a new issue #10369:
URL: https://github.com/apache/druid/issues/10369


   ### Affected Version
   
   The Druid version 0.19.0, 0.18.0
   
   ### Description
   
   When issuing a `SELECT` (no `GROUP BY`) query with `LIMIT 0` the 
`sqlOuterLimit: 100` context value is ignored and all rows are returned.
   
   Good:
   
   
![image](https://user-images.githubusercontent.com/177816/92535949-46777b00-f1ed-11ea-96a6-a93f8fb9aa91.png)
   
   Bad:
   
   
![image](https://user-images.githubusercontent.com/177816/92535998-6a3ac100-f1ed-11ea-8f42-848d6b4b8a1e.png)
   
   Another simpler example:
   
   ```sql
   SELECT * FROM (
     SELECT * FROM "wikipedia" LIMIT 200
   ) LIMIT 0
   ```
   
   
![image](https://user-images.githubusercontent.com/177816/92536191-dfa69180-f1ed-11ea-9def-a3082f1dbc76.png)
   
   Side note: setting `LIMIT 0` on a GROUP BY query results in 'could not build 
plan' which is fair enough


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to