LakshSingla commented on code in PR #16800:
URL: https://github.com/apache/druid/pull/16800#discussion_r1692446734
##########
sql/src/test/java/org/apache/druid/sql/calcite/CalciteWindowQueryTest.java:
##########
@@ -73,6 +73,13 @@ public class CalciteWindowQueryTest extends
BaseCalciteQueryTest
QueryContexts.ENABLE_DEBUG, true
);
+ private static final Map<String, Object>
DEFAULT_QUERY_CONTEXT_WITH_SUBQUERY_BYTES =
+ ImmutableMap.<String, Object>builder()
+ .putAll(DEFAULT_QUERY_CONTEXT)
+ .put(QueryContexts.MAX_SUBQUERY_BYTES_KEY, "100000")
+ .put(QueryContexts.MAX_SUBQUERY_ROWS_KEY, "0")
Review Comment:
> so without setting it like this its not even possible to set it to 0
With maxSubqueryBytes set, the queries can default to row-based limiting.
For example, here:
https://github.com/apache/druid/pull/16800/files#diff-788b8a750f09134a406d02535f5d06b106ce89e3aece072902af3362b310ac83L3.
Even though maxSubqueryBytes was set, the query passed even though window
functions don't support byte-based limiting.
> we have default as 100k and @Min(1) in [ServerConfig
defaults](https://github.com/apache/druid/blob/71725b41b54d13e1d4bd6c8b4f9b2972790d3dea/server/src/main/java/org/apache/druid/server/initialization/ServerConfig.java#L138-L140)
Server config defaults are for the whole server, therefore it isn't a good
practice to set it to something negative which will be interpreted as
unlimited. For individual queries, however, we can bypass it as needed.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]