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/10/15 03:49:12 UTC

[GitHub] [druid] kfaraz commented on a diff in pull request #13228: docs(msq): update insert vs replace for dimension-based segment pruning

kfaraz commented on code in PR #13228:
URL: https://github.com/apache/druid/pull/13228#discussion_r996247003


##########
docs/multi-stage-query/concepts.md:
##########
@@ -102,6 +104,19 @@ issues](./known-issues.md#select) page.
 
 For more information about the syntax, see [REPLACE](./reference.md#replace).
 
+When deciding whether to use REPLACE or INSERT, keep in mind that REPLACE can perform dimension-based segment pruning but INSERT cannot. To use dimension-based segment pruning, your query needs to meet the following requirements:

Review Comment:
   This part and the above change on line 81/82 needs to be rephrased.
   
   To clarify, INSERT or REPLACE queries (better called statements for less ambiguity in this case?) cannot and need not perform dimension-based pruning (* unless they are doing a sub-SELECT on some other datasource).
   It is the queries (i.e. SELECT queries of any kind) that we run on the _segments_ generated with the above INSERT or REPLACE statements that could potentially benefit from such pruning.
   
   As a suggestion:
   
   ```suggestion
   When deciding whether to use REPLACE or INSERT, keep in mind that segments generated with REPLACE can be pruned with dimension-based pruning but those generated with INSERT cannot. Please refer to [Clustering](#clustering) for the prerequisites of dimension-based pruning.:
   ```



##########
docs/multi-stage-query/concepts.md:
##########
@@ -102,6 +104,19 @@ issues](./known-issues.md#select) page.
 
 For more information about the syntax, see [REPLACE](./reference.md#replace).
 
+When deciding whether to use REPLACE or INSERT, keep in mind that REPLACE can perform dimension-based segment pruning but INSERT cannot. To use dimension-based segment pruning, your query needs to meet the following requirements:
+
+- Segments were generated by a REPLACE statement, not an INSERT statement.

Review Comment:
   I don't think this section needs to be reiterated here as this info is already captured later in the "Clustering" section. I think just linking to that section is enough.



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