vtlim commented on code in PR #18179:
URL: https://github.com/apache/druid/pull/18179#discussion_r2178257252


##########
docs/querying/multi-value-dimensions.md:
##########
@@ -498,7 +498,7 @@ Having specs are applied at the outermost level of groupBy 
query processing.
 ## Disable GroupBy on multi-value columns
 
 You can disable the implicit unnesting behavior for groupBy by setting 
`groupByEnableMultiValueUnnesting: false` in your 
-[query context](query-context.md). In this mode, the groupBy engine will 
return an error instead of completing the query. This is a safety 
+[query context reference](query-context-reference.md). In this mode, the 
groupBy engine will return an error instead of completing the query. This is a 
safety 

Review Comment:
   ```suggestion
   [query context](query-context-reference.md). In this mode, the groupBy 
engine will return an error instead of completing the query. This is a safety 
   ```



##########
docs/querying/caching.md:
##########
@@ -81,7 +81,7 @@ Use *whole-query caching* on the Broker to increase query 
efficiency when there
 
 - On Brokers for small production clusters with less than five servers. 
 
-Avoid using per-segment cache at the Broker for large production clusters. 
When the Broker cache is enabled (`druid.broker.cache.populateCache` is `true`) 
and `populateCache` _is not_ `false` in the [query 
context](../querying/query-context.md), individual Historicals will _not_ merge 
individual segment-level results, and instead pass these back to the lead 
Broker. The Broker must then carry out a large merge from _all_ segments on its 
own.
+Avoid using per-segment cache at the Broker for large production clusters. 
When the Broker cache is enabled (`druid.broker.cache.populateCache` is `true`) 
and `populateCache` _is not_ `false` in the [query context 
reference](../querying/query-context-reference.md), individual Historicals will 
_not_ merge individual segment-level results, and instead pass these back to 
the lead Broker. The Broker must then carry out a large merge from _all_ 
segments on its own.

Review Comment:
   ```suggestion
   Avoid using per-segment cache at the Broker for large production clusters. 
When the Broker cache is enabled (`druid.broker.cache.populateCache` is `true`) 
and `populateCache` _is not_ `false` in the [query 
context](../querying/query-context-reference.md), individual Historicals will 
_not_ merge individual segment-level results, and instead pass these back to 
the lead Broker. The Broker must then carry out a large merge from _all_ 
segments on its own.
   ```



##########
docs/operations/mixed-workloads.md:
##########
@@ -69,14 +69,14 @@ If you use the __high/low laning strategy__, set the 
following:
 
 * `druid.query.scheduler.laning.maxLowPercent` – The maximum percent of query 
threads to handle low priority queries. The remaining query threads are 
dedicated to high priority queries.
 
-Consider also defining a [prioritization 
strategy](../configuration/index.md#prioritization-strategies) for the Broker 
to label queries as high or low priority. Otherwise, manually set the priority 
for incoming queries on the [query context](../querying/query-context.md).
+Consider also defining a [prioritization 
strategy](../configuration/index.md#prioritization-strategies) for the Broker 
to label queries as high or low priority. Otherwise, manually set the priority 
for incoming queries on the [query context 
reference](../querying/query-context-reference.md).
 
 If you use a __manual laning strategy__, set the following:
 
 * `druid.query.scheduler.laning.lanes.{name}` – The limit for how many queries 
can run in the `name` lane. Define as many named lanes as needed.
 * `druid.query.scheduler.laning.isLimitPercent` – Whether to treat the lane 
limit as an exact number or a percent of the minimum of 
`druid.server.http.numThreads` or `druid.query.scheduler.numThreads`.
 
-With manual laning, incoming queries can be labeled with the desired lane in 
the `lane` parameter of the [query context](../querying/query-context.md).
+With manual laning, incoming queries can be labeled with the desired lane in 
the `lane` parameter of the [query context 
reference](../querying/query-context-reference.md).

Review Comment:
   ```suggestion
   With manual laning, incoming queries can be labeled with the desired lane in 
the `lane` parameter of the [query 
context](../querying/query-context-reference.md).
   ```



##########
docs/querying/timeseriesquery.md:
##########
@@ -84,7 +84,7 @@ There are 7 main parts to a timeseries query:
 |aggregations|See [Aggregations](../querying/aggregations.md)|no|
 |postAggregations|See [Post Aggregations](../querying/post-aggregations.md)|no|
 |limit|An integer that limits the number of results. The default is 
unlimited.|no|
-|context|Can be used to modify query behavior, including [grand 
totals](#grand-totals) and [empty bucket values](#empty-bucket-values). See 
also [Context](../querying/query-context.md) for parameters that apply to all 
query types.|no|
+|context|Can be used to modify query behavior, including [grand 
totals](#grand-totals) and [empty bucket values](#empty-bucket-values). See 
also [Context](../querying/query-context-reference.md) for parameters that 
apply to all query types.|no|

Review Comment:
   ```suggestion
   |context|Can be used to modify query behavior, including [grand 
totals](#grand-totals) and [empty bucket values](#empty-bucket-values). See 
also [Query context reference](../querying/query-context-reference.md) for 
parameters that apply to all query types.|no|
   ```



##########
docs/operations/mixed-workloads.md:
##########
@@ -69,14 +69,14 @@ If you use the __high/low laning strategy__, set the 
following:
 
 * `druid.query.scheduler.laning.maxLowPercent` – The maximum percent of query 
threads to handle low priority queries. The remaining query threads are 
dedicated to high priority queries.
 
-Consider also defining a [prioritization 
strategy](../configuration/index.md#prioritization-strategies) for the Broker 
to label queries as high or low priority. Otherwise, manually set the priority 
for incoming queries on the [query context](../querying/query-context.md).
+Consider also defining a [prioritization 
strategy](../configuration/index.md#prioritization-strategies) for the Broker 
to label queries as high or low priority. Otherwise, manually set the priority 
for incoming queries on the [query context 
reference](../querying/query-context-reference.md).

Review Comment:
   ```suggestion
   Consider also defining a [prioritization 
strategy](../configuration/index.md#prioritization-strategies) for the Broker 
to label queries as high or low priority. Otherwise, manually set the priority 
for incoming queries on the [query 
context](../querying/query-context-reference.md).
   ```



##########
docs/release-info/migr-subquery-limit.md:
##########
@@ -60,5 +60,5 @@ See [Metrics 
monitors](../configuration/index.md#metrics-monitors-for-each-servi
 
 See the following topics for more information:
 
-- [Query context](../querying/query-context.md) for information on setting 
query context parameters.
+- [Query context reference](../querying/query-context-reference.md) for 
information on setting query context parameters.

Review Comment:
   ```suggestion
   - [Query context reference](../querying/query-context-reference.md) for 
information on query context parameters.
   ```



##########
docs/querying/datasourcemetadataquery.md:
##########
@@ -48,7 +48,7 @@ There are 2 main parts to a Data Source Metadata query:
 |--------|-----------|---------|
 |queryType|This String should always be "dataSourceMetadata"; this is the 
first thing Apache Druid looks at to figure out how to interpret the query|yes|
 |dataSource|A String or Object defining the data source to query, very similar 
to a table in a relational database. See 
[DataSource](../querying/datasource.md) for more information.|yes|
-|context|See [Context](../querying/query-context.md)|no|
+|context|See [Context](../querying/query-context-reference.md)|no|

Review Comment:
   ```suggestion
   |context|See [Query context 
reference](../querying/query-context-reference.md)|no|
   ```



##########
docs/querying/timeboundaryquery.md:
##########
@@ -48,7 +48,7 @@ There are 3 main parts to a time boundary query:
 |dataSource|A String or Object defining the data source to query, very similar 
to a table in a relational database. See 
[DataSource](../querying/datasource.md) for more information.|yes|
 |bound   | Optional, set to `maxTime` or `minTime` to return only the latest 
or earliest timestamp. Default to returning both if not set| no |
 |filter|See [Filters](../querying/filters.md)|no|
-|context|See [Context](../querying/query-context.md)|no|
+|context|See [Context](../querying/query-context-reference.md)|no|

Review Comment:
   ```suggestion
   |context|See [Query context 
reference](../querying/query-context-reference.md)|no|
   ```



##########
docs/querying/sql-query-context.md:
##########


Review Comment:
   Remove section on `## Set the query context` since it is now moved to the 
new doc (which you linked to in the introduction)



##########
docs/querying/sql.md:
##########
@@ -383,6 +383,7 @@ Request logs show the exact native query that will be run. 
Alternatively, to see
 
 SET statements allow you to specify SQL query context parameters that modify 
the behavior of a Druid SQL query. You can include one or more SET statements 
before the main SQL query. Druid supports using SET in the Druid SQL [JSON 
API](../api-reference/sql-api.md) and the [web 
console](../operations/web-console.md). 
 
+For instructions on how the different approaches for set query context in your 
queries, see [Set the Query Context](./set-query-context.md).

Review Comment:
   ```suggestion
   For other approaches to set the query context, see [Set query 
context](./set-query-context.md).
   ```



##########
docs/querying/topnquery.md:
##########
@@ -111,7 +111,7 @@ There are 11 parts to a topN query.
 |dimension|A String or JSON object defining the dimension that you want the 
top taken for. For more info, see 
[DimensionSpecs](../querying/dimensionspecs.md)|yes|
 |threshold|An integer defining the N in the topN (i.e. how many results you 
want in the top list)|yes|
 |metric|A String or JSON object specifying the metric to sort by for the top 
list. For more info, see [TopNMetricSpec](../querying/topnmetricspec.md).|yes|
-|context|See [Context](../querying/query-context.md)|no|
+|context|See [Context](../querying/query-context-reference.md)|no|

Review Comment:
   ```suggestion
   |context|See [Query context 
reference](../querying/query-context-reference.md)|no|
   ```



##########
docs/querying/sql-query-context.md:
##########
@@ -29,7 +29,9 @@ sidebar_label: "SQL query context"
 :::
 
 Druid supports query context parameters which affect [SQL query](./sql.md) 
planning.
-See [Query context](query-context.md) for general query context parameters for 
all query types.
+See [Query context](query-context-reference.md) for general query context 
parameters for all query types.
+
+For more detailed instructions on how to set query context in Apache Druid, 
see [Set the query context](../querying/set-query-context.md)

Review Comment:
   ```suggestion
   For information on how to set the query context, see [Set query 
context](../querying/set-query-context.md)
   ```



##########
docs/querying/set-query-context.md:
##########
@@ -0,0 +1,310 @@
+---
+id: set-query-context
+title: "Set query context"
+sidebar_label: "Set query context"
+---
+
+<!--
+  ~ 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.
+  -->
+  
+
+Query context gives you fine-grained control over how Apache Druid executes 
your individual queries. While Druid's default settings work well for most 
queries, you can set query context to handle specific requirements and optimize 
performance.

Review Comment:
   ```suggestion
   The query context gives you fine-grained control over how Apache Druid 
executes your individual queries. While the default settings in Druid work well 
for most queries, you can set the query context to handle specific requirements 
and optimize performance.
   ```



##########
docs/querying/using-caching.md:
##########
@@ -72,7 +72,7 @@ druid.broker.cache.populateResultLevelCache=true
 See [Broker caching](../configuration/index.md#broker-caching) for a 
description of all available Broker cache configurations.
  
 ## Enabling caching in the query context
-As long as the service is set to populate the cache, you can set cache options 
for individual queries in the query [context](./query-context.md). For example, 
you can `POST` a Druid SQL request to the HTTP POST API and include the context 
as a JSON object:
+As long as the service is set to populate the cache, you can set cache options 
for individual queries in the [query context 
reference](./query-context-reference.md). For example, you can `POST` a Druid 
SQL request to the HTTP POST API and include the context as a JSON object:

Review Comment:
   ```suggestion
   
   As long as the service is set to populate the cache, you can set cache 
options for individual queries in the [query 
context](./query-context-reference.md). For example, you can send a POST 
request to the Druid SQL API and include the context as a JSON object:
   ```



##########
docs/querying/using-caching.md:
##########
@@ -91,5 +91,5 @@ You can also use the SET command to specify cache options 
directly within your S
 ## Learn more
 See the following topics for more information:
 - [Query caching](./caching.md) for an overview of caching.
-- [Query context](./query-context.md) for more details and usage for the query 
context.
+- [Query context reference](./query-context-reference.md) for more details and 
usage for the query context.

Review Comment:
   ```suggestion
   - [Query context reference](./query-context-reference.md) for more details 
about query context parameters.
   ```



##########
docs/querying/sql.md:
##########
@@ -383,6 +383,7 @@ Request logs show the exact native query that will be run. 
Alternatively, to see
 
 SET statements allow you to specify SQL query context parameters that modify 
the behavior of a Druid SQL query. You can include one or more SET statements 
before the main SQL query. Druid supports using SET in the Druid SQL [JSON 
API](../api-reference/sql-api.md) and the [web 
console](../operations/web-console.md). 
 
+For instructions on how the different approaches for set query context in your 
queries, see [Set the Query Context](./set-query-context.md).

Review Comment:
   Move this line to the end of the section



##########
docs/tutorials/tutorial-query.md:
##########
@@ -143,7 +143,7 @@ from the command line or over HTTP.
 :::
 
 
-9. Finally, click  `...`  and **Edit context** to see how you can add 
additional parameters controlling the execution of the query execution. In the 
field, enter query context options as JSON key-value pairs, as described in 
[Context flags](../querying/query-context.md).  
+9. Finally, click  `...`  and **Edit context** to see how you can add 
additional parameters controlling the execution of the query execution. In the 
field, enter query context options as JSON key-value pairs, as described in 
[Context flags](../querying/query-context-reference.md).  

Review Comment:
   ```suggestion
   9. Finally, click  `...`  and **Edit context** to see how you can add 
additional parameters controlling the execution of the query execution. In the 
field, enter query context options as JSON key-value pairs, as described in 
[Set query context](../querying/set-query-context.md#druid-web-console).  
   ```



##########
docs/querying/querying.md:
##########
@@ -30,6 +30,8 @@ title: "Native queries"
  it runs a SQL query, refer to the [SQL 
documentation](sql-translation.md#query-types).
 :::
 
+For instructions on how the different approaches for set query context in your 
queries, see [Set the Query Context](./set-query-context.md).

Review Comment:
   Recommend creating a learn more section to include this link. Also link to
   * How to set query context
   * Tutorial if there is an appropriate one



##########
docs/querying/set-query-context.md:
##########
@@ -0,0 +1,310 @@
+---
+id: set-query-context
+title: "Set query context"
+sidebar_label: "Set query context"
+---
+
+<!--
+  ~ 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.
+  -->
+  
+
+Query context gives you fine-grained control over how Apache Druid executes 
your individual queries. While Druid's default settings work well for most 
queries, you can set query context to handle specific requirements and optimize 
performance.
+
+You'll use query context when you need to:

Review Comment:
   * Remove future tense
   * Think about rewording the intro sentence to let the reader know that these 
are examples (not a complete list)



-- 
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]

Reply via email to