ramitg254 commented on code in PR #6413:
URL: https://github.com/apache/hive/pull/6413#discussion_r3396630185


##########
ql/src/java/org/apache/hadoop/hive/ql/parse/ColumnStatsSemanticAnalyzer.java:
##########
@@ -107,7 +107,8 @@ private boolean shouldRewrite(ASTNode tree) {
    */
   private static FieldSchemas getStatsEligibleFieldSchemas(Table tbl) {
     List<FieldSchema> result = new ArrayList<>();
-    for (FieldSchema col : tbl.getCols()) {
+    List<FieldSchema> colsToLookUp = tbl.hasNonNativePartitionSupport() ? 
tbl.getAllCols() : tbl.getCols();

Review Comment:
   yes, you are right, I remembered it was required because of 
partTransformSpec gets appended in case of non native tables even though it is 
identity when isPartitionStats is true for genRewrittenQuery:
   ```
   else {
           rewrittenQueryBuilder.append(", ")
             .append(TransformSpec.toNamedStruct(partTransformSpec, conf));
         }
   ```
   that's why we needed to include partition columns as well



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to