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/04/11 10:24:25 UTC

[GitHub] [hive] miklosgergely commented on a change in pull request #980: HIVE-22458: Add more constraints on showing partitions

miklosgergely commented on a change in pull request #980: HIVE-22458: Add more constraints on showing partitions
URL: https://github.com/apache/hive/pull/980#discussion_r407046405
 
 

 ##########
 File path: ql/src/java/org/apache/hadoop/hive/ql/ddl/table/partition/show/ShowPartitionAnalyzer.java
 ##########
 @@ -57,10 +67,75 @@ public void analyzeInternal(ASTNode ast) throws SemanticException {
     inputs.add(new ReadEntity(table));
 
     ShowPartitionsDesc desc = new ShowPartitionsDesc(tableName, ctx.getResFile(), partSpec);
+    analyzeShowPartitionsConstraints(ast, table, desc);
     Task<DDLWork> task = TaskFactory.get(new DDLWork(getInputs(), getOutputs(), desc));
     rootTasks.add(task);
 
     task.setFetchSource(true);
     setFetchTask(createFetchTask(ShowPartitionsDesc.SCHEMA));
   }
+
+  private void analyzeShowPartitionsConstraints(ASTNode ast, Table tab,
 
 Review comment:
   Please don't use long methods like this at ddl. Instead  cut it to 3 different methods, similar to getPartitionSpecs, each retrieving one data, returning it to analyzeInternal. Also please don't use setters at ShowPartitionDesc, a desc object at ddl should have final variables set at the constructor, and not by setters. This declares that they may not change later. Thanks.

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


With regards,
Apache Git Services

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