LakshSingla commented on code in PR #16519:
URL: https://github.com/apache/druid/pull/16519#discussion_r1621078758


##########
docs/release-info/migr-subquery-limit.md:
##########
@@ -0,0 +1,55 @@
+---
+id: migr-subquery-limit
+title: "Migration guide: Subquery limit"
+sidebar_label: Subquery limit
+---
+
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+-->
+
+:::info
+The byte-based subquery limit is an [experimental 
feature](../development/experimental.md) introduced in Druid 30.0.0.
+:::
+
+Druid now allows you to set a byte-based limit on subquery size, to prevent 
brokers from running out of memory when handling large subqueries. Druid uses 
subqueries as joins as well as in common table expressions, such as WITH.
+
+The byte-based subquery limit works in conjunction with Druid's row-based 
subquery limit.

Review Comment:
   Byte-based supersedes the row-based limit. If for some reason (most likely a 
bug or an unsupported column type) we aren't able to materialize the subquery 
as bytes, the row based limit is used as a fallback. "conjunction" doesn't seem 
correct, since it implies that both are applied to a single query. 



##########
docs/release-info/migr-subquery-limit.md:
##########
@@ -0,0 +1,55 @@
+---
+id: migr-subquery-limit
+title: "Migration guide: Subquery limit"
+sidebar_label: Subquery limit
+---
+
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+-->
+
+:::info
+The byte-based subquery limit is an [experimental 
feature](../development/experimental.md) introduced in Druid 30.0.0.

Review Comment:
   It was introduced a while back, not in Druid 30.0.0. 



##########
docs/release-info/migr-subquery-limit.md:
##########
@@ -0,0 +1,55 @@
+---
+id: migr-subquery-limit
+title: "Migration guide: Subquery limit"
+sidebar_label: Subquery limit
+---
+
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+-->
+
+:::info
+The byte-based subquery limit is an [experimental 
feature](../development/experimental.md) introduced in Druid 30.0.0.
+:::
+
+Druid now allows you to set a byte-based limit on subquery size, to prevent 
brokers from running out of memory when handling large subqueries. Druid uses 
subqueries as joins as well as in common table expressions, such as WITH.
+
+The byte-based subquery limit works in conjunction with Druid's row-based 
subquery limit.
+
+## Row-based subquery limit
+
+Druid uses the `maxSubqueryRows` property to limit the number of rows Druid 
returns in a subquery. Because this is a row-based limit, it doesn't restrict 
the overall size of the returned data.
+
+The `maxSubqueryRows` property is set to 100,000 by default.
+
+## Enable a byte-based subquery limit
+
+Set the optional property `maxSubqueryBytes` to set a maximum number of 
returned bytes. This property takes precedence over `maxSubqueryRows`.
+
+## Usage considerations
+
+You can set both `maxSubqueryRows` and `maxSubqueryBytes` at cluster level and 
override them in individual queries.
+
+For queries that generate a large number of subqueries, we recommend that you 
don't use `maxSubqueryBytes` from the outset. You can increase 
`maxSubqueryRows` and then configure the byte-based limit if you find that 
Druid needs it to process the query.

Review Comment:
   It should be "large number of rows" instead of "subqueries". We can probably 
quantify that amount as well (genrates approximately 5mn or more rows). 



-- 
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-unsubscr...@druid.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org

Reply via email to