shameersss1 commented on a change in pull request #1105:
URL: https://github.com/apache/hive/pull/1105#discussion_r452288569



##########
File path: parser/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g
##########
@@ -1942,8 +1942,8 @@ metastoreCheck
 @after { popMsg(state); }
     : KW_MSCK (repair=KW_REPAIR)?
       (KW_TABLE tableName
-        (opt=(KW_ADD|KW_DROP|KW_SYNC) (parts=KW_PARTITIONS) 
(filterPartitionSpec)?)?)
-    -> ^(TOK_MSCK $repair? tableName? $opt? (filterPartitionSpec)?)
+        (opt=(KW_ADD|KW_DROP|KW_SYNC) (parts=KW_PARTITIONS)? 
(dropPartitionSpec)?)?)

Review comment:
       Option 2 looks good, Option 1 will change the current syntax.
   Fixed.

##########
File path: parser/src/java/org/apache/hadoop/hive/ql/parse/IdentifiersParser.g
##########
@@ -720,7 +720,7 @@ partitionVal
 
 dropPartitionSpec
     :
-    KW_PARTITION
+    KW_PARTITION | KW_PARTITIONS

Review comment:
       As discussed above!

##########
File path: ql/src/java/org/apache/hadoop/hive/ql/ddl/misc/msck/MsckAnalyzer.java
##########
@@ -71,10 +71,15 @@ public void analyzeInternal(ASTNode root) throws 
SemanticException {
     Map<Integer, List<ExprNodeGenericFuncDesc>> partitionSpecs = 
ParseUtils.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
+      // expression proxy class needs to be PartitionExpressionForMetastore 
since we intend to use the
       // filterPartitionsByExpr of PartitionExpressionForMetastore for 
partition pruning down the line.
-      conf.set(MetastoreConf.ConfVars.EXPRESSION_PROXY_CLASS.getVarname(),
-          PartitionExpressionForMetastore.class.getCanonicalName());
+      // Bail out early if expressionProxyClass is not configured properly.
+      String expressionProxyClass = 
conf.get(MetastoreConf.ConfVars.EXPRESSION_PROXY_CLASS.getVarname());
+      if (expressionProxyClass == null || expressionProxyClass.isEmpty() ||
+          
!expressionProxyClass.equals(PartitionExpressionForMetastore.class.getCanonicalName()))
 {

Review comment:
       Fixed!




----------------------------------------------------------------
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to