[
https://issues.apache.org/jira/browse/HIVE-22957?focusedWorklogId=456539&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-456539
]
ASF GitHub Bot logged work on HIVE-22957:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 09/Jul/20 10:54
Start Date: 09/Jul/20 10:54
Worklog Time Spent: 10m
Work Description: shameersss1 commented on a change in pull request #1105:
URL: https://github.com/apache/hive/pull/1105#discussion_r452132963
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/ddl/misc/msck/MsckAnalyzer.java
##########
@@ -63,13 +67,24 @@ public void analyzeInternal(ASTNode root) throws
SemanticException {
}
Table table = getTable(tableName);
- List<Map<String, String>> specs = getPartitionSpecs(table, root);
+ Map<Integer, List<ExprNodeGenericFuncDesc>> partitionSpecs =
getFullPartitionSpecs(root, table, conf, false);
+ byte[] filterExp = null;
+ if (partitionSpecs != null & !partitionSpecs.isEmpty()) {
+ // explicitly set expression proxy class to
PartitionExpressionForMetastore since we intend to use the
+ // filterPartitionsByExpr of PartitionExpressionForMetastore for
partition pruning down the line.
+ conf.set(MetastoreConf.ConfVars.EXPRESSION_PROXY_CLASS.getVarname(),
Review comment:
Yes, It won't work with remote metastore. Currently only planning for
embedded metastore, Sure, we should bail out if conditions are not met.
Currently i have added the bail out code in HiveMetaStoreChecker. But i feel
bail out should have been much more earlier. I Couldn't think of a better spot.
Any thoughts on this?
##########
File path: parser/src/java/org/apache/hadoop/hive/ql/parse/IdentifiersParser.g
##########
@@ -734,6 +734,21 @@ dropPartitionOperator
EQUAL | NOTEQUAL | LESSTHANOREQUALTO | LESSTHAN | GREATERTHANOREQUALTO |
GREATERTHAN
;
+filterPartitionSpec
+ :
+ LPAREN filterPartitionVal (COMMA filterPartitionVal )* RPAREN ->
^(TOK_PARTSPEC filterPartitionVal +)
+ ;
+
+filterPartitionVal
+ :
+ identifier filterPartitionOperator constant -> ^(TOK_PARTVAL identifier
filterPartitionOperator constant)
Review comment:
Based on the implementation, I don't think there was never such a use
case. I guess we always except it to be contatant
Refer:
https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/ddl/misc/msck/MsckAnalyzer.java#L66
https://github.com/apache/hive/blob/6f9c7bc490e31ee23556a316f2ac4a886d4eff1e/ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java#L1527
https://github.com/apache/hive/blob/6f9c7bc490e31ee23556a316f2ac4a886d4eff1e/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreChecker.java#L259
----------------------------------------------------------------
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 456539)
Time Spent: 2h (was: 1h 50m)
> Support Partition Filtering In MSCK REPAIR TABLE Command
> --------------------------------------------------------
>
> Key: HIVE-22957
> URL: https://issues.apache.org/jira/browse/HIVE-22957
> Project: Hive
> Issue Type: Improvement
> Reporter: Syed Shameerur Rahman
> Assignee: Syed Shameerur Rahman
> Priority: Major
> Labels: pull-request-available
> Fix For: 4.0.0
>
> Attachments: Design Doc_ Partition Filtering In MSCK REPAIR
> TABLE.pdf, HIVE-22957.01.patch, HIVE-22957.02.patch, HIVE-22957.03.patch
>
> Time Spent: 2h
> Remaining Estimate: 0h
>
> *Design Doc:*
> [^Design Doc_ Partition Filtering In MSCK REPAIR TABLE.pdf]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)