You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "dttung2905 (via GitHub)" <gi...@apache.org> on 2024/02/02 00:25:48 UTC
Re: [I] [multistage] attach default limit 10 to queries that doesn't have a limit [pinot]
dttung2905 commented on issue #12304:
URL: https://github.com/apache/pinot/issues/12304#issuecomment-1922563716
Hi @walterddr,
I'm just following the issue and I think applying the limit by default is a really good idea too. Although I'm quite new to the pinot code base, I think the starting point is the `setLimit()` method https://github.com/apache/pinot/blob/0a4398634be81cdbbe891b3da249134ef98743e7/pinot-common/src/main/java/org/apache/pinot/sql/parsers/CalciteSqlParser.java#L495-L499
I have a question. How do we know if the `LIMIT` is set in the main query or the sub query as we only want to set default limit to the main query. Could you point me to the right place in the code base ?
I think I found the place where we parse the subquery but not sure how they all are connected
https://github.com/apache/pinot/blob/0a4398634be81cdbbe891b3da249134ef98743e7/pinot-common/src/main/java/org/apache/pinot/sql/parsers/CalciteSqlParser.java#L510-L519
Would love to create a PR to solve this if you permit :smile:
--
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.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org