You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2022/09/06 16:44:14 UTC

[GitHub] [druid] vogievetsky opened a new pull request, #13033: remove mentions of DruidQueryRel from docs

vogievetsky opened a new pull request, #13033:
URL: https://github.com/apache/druid/pull/13033

   After https://github.com/apache/druid/pull/12936 users will never see the `DruidQueryRel` based plans so the docs need to be updated to the new (and simpler) explain format


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

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


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


[GitHub] [druid] vogievetsky merged pull request #13033: remove mentions of DruidQueryRel from docs

Posted by GitBox <gi...@apache.org>.
vogievetsky merged PR #13033:
URL: https://github.com/apache/druid/pull/13033


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

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


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


[GitHub] [druid] vtlim commented on a diff in pull request #13033: remove mentions of DruidQueryRel from docs

Posted by GitBox <gi...@apache.org>.
vtlim commented on code in PR #13033:
URL: https://github.com/apache/druid/pull/13033#discussion_r963964828


##########
docs/querying/sql-translation.md:
##########
@@ -63,37 +63,137 @@ appreciated.
 ## Interpreting EXPLAIN PLAN output
 
 The [EXPLAIN PLAN](sql.md#explain-plan) functionality can help you understand how a given SQL query will
-be translated to native. For simple queries that do not involve subqueries or joins, the output of EXPLAIN PLAN
-is easy to interpret. The native query that will run is embedded as JSON inside a "DruidQueryRel" line:
-
-```
-> EXPLAIN PLAN FOR SELECT COUNT(*) FROM wikipedia
-
-DruidQueryRel(query=[{"queryType":"timeseries","dataSource":"wikipedia","intervals":"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z","granularity":"all","aggregations":[{"type":"count","name":"a0"}]}], signature=[{a0:LONG}])
+be translated to native. The native queries that will run are returned as a JSON array in the PLAN column:

Review Comment:
   ```suggestion
   be translated to native.
   EXPLAIN PLAN statements return a `RESOURCES` column that describes the resource being queried as well as a `PLAN` column that contains a JSON array of native queries that Druid will run.
   For example, consider the following query:
   ```



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

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


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


[GitHub] [druid] vtlim commented on a diff in pull request #13033: remove mentions of DruidQueryRel from docs

Posted by GitBox <gi...@apache.org>.
vtlim commented on code in PR #13033:
URL: https://github.com/apache/druid/pull/13033#discussion_r963970313


##########
docs/querying/sql-translation.md:
##########
@@ -63,37 +63,137 @@ appreciated.
 ## Interpreting EXPLAIN PLAN output
 
 The [EXPLAIN PLAN](sql.md#explain-plan) functionality can help you understand how a given SQL query will
-be translated to native. For simple queries that do not involve subqueries or joins, the output of EXPLAIN PLAN
-is easy to interpret. The native query that will run is embedded as JSON inside a "DruidQueryRel" line:
-
-```
-> EXPLAIN PLAN FOR SELECT COUNT(*) FROM wikipedia
-
-DruidQueryRel(query=[{"queryType":"timeseries","dataSource":"wikipedia","intervals":"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z","granularity":"all","aggregations":[{"type":"count","name":"a0"}]}], signature=[{a0:LONG}])
+be translated to native. The native queries that will run are returned as a JSON array in the PLAN column:
+
+```sql
+EXPLAIN PLAN FOR
+SELECT
+  channel,
+  COUNT(*)
+FROM wikipedia
+WHERE channel IN (SELECT page FROM wikipedia GROUP BY page ORDER BY COUNT(*) DESC LIMIT 10)
+GROUP BY channel
 ```
 
-For more complex queries that do involve subqueries or joins, EXPLAIN PLAN is somewhat more difficult to interpret.
-For example, consider this query:
+Returns the following plan:

Review Comment:
   ```suggestion
   The EXPLAIN PLAN statement returns the following plan:
   ```



##########
docs/querying/sql-translation.md:
##########
@@ -63,37 +63,137 @@ appreciated.
 ## Interpreting EXPLAIN PLAN output
 
 The [EXPLAIN PLAN](sql.md#explain-plan) functionality can help you understand how a given SQL query will
-be translated to native. For simple queries that do not involve subqueries or joins, the output of EXPLAIN PLAN
-is easy to interpret. The native query that will run is embedded as JSON inside a "DruidQueryRel" line:
-
-```
-> EXPLAIN PLAN FOR SELECT COUNT(*) FROM wikipedia
-
-DruidQueryRel(query=[{"queryType":"timeseries","dataSource":"wikipedia","intervals":"-146136543-09-08T08:23:32.096Z/146140482-04-24T15:36:27.903Z","granularity":"all","aggregations":[{"type":"count","name":"a0"}]}], signature=[{a0:LONG}])
+be translated to native. The native queries that will run are returned as a JSON array in the PLAN column:

Review Comment:
   ```suggestion
   be translated to native. The native queries that will run are returned as a JSON array in the PLAN column. For example, consider the following query:
   ```



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

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


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