You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2020/10/13 00:28:10 UTC
[GitHub] [hive] nareshpr commented on a change in pull request #1568: HIVE-24255: StorageHandler with select-limit query is returning 0 rows
nareshpr commented on a change in pull request #1568:
URL: https://github.com/apache/hive/pull/1568#discussion_r503602357
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/optimizer/GlobalLimitOptimizer.java
##########
@@ -99,27 +99,31 @@ public ParseContext transform(ParseContext pctx) throws SemanticException {
LimitDesc tempGlobalLimitDesc = tempGlobalLimit.getConf();
Table tab = ts.getConf().getTableMetadata();
Set<FilterOperator> filterOps = OperatorUtils.findOperators(ts, FilterOperator.class);
-
- if (!tab.isPartitioned()) {
- if (filterOps.size() == 0) {
- Integer tempOffset = tempGlobalLimitDesc.getOffset();
- globalLimitCtx.enableOpt(tempGlobalLimitDesc.getLimit(),
- (tempOffset == null) ? 0 : tempOffset);
- }
- } else {
- // check if the pruner only contains partition columns
- if (onlyContainsPartnCols(tab, filterOps)) {
-
- String alias = (String) topOps.keySet().toArray()[0];
- PrunedPartitionList partsList = pctx.getPrunedPartitions(alias, ts);
-
- // If there is any unknown partition, create a map-reduce job for
- // the filter to prune correctly
- if (!partsList.hasUnknownPartitions()) {
+ // StorageHandlers will always have empty tablePath.
+ // GenMapRedUtils.setMapWork removes empty tablePath from input dir with select-Limit
+ // InputFormat.getSplits wont be called if no input path & TS Vertex will have 0 task parallelism
+ if (tab.getStorageHandler() == null) {
Review comment:
Handled in the new commit Vineet. Thanks for review.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org