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 2021/02/26 09:29:32 UTC

[GitHub] [hive] kgyrtkirk commented on a change in pull request #2018: HIVE-24827. Hive aggregation query returns incorrect results for non text files.

kgyrtkirk commented on a change in pull request #2018:
URL: https://github.com/apache/hive/pull/2018#discussion_r583499772



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java
##########
@@ -4028,6 +4035,13 @@ public static int getFooterCount(TableDesc table, JobConf job) throws IOExceptio
     int footerCount;
     try {
       footerCount = Integer.parseInt(table.getProperties().getProperty(serdeConstants.FOOTER_COUNT, "0"));
+      if (footerCount > 0 && table.getInputFileFormatClass() != null
+          && !TextInputFormat.class
+          .isAssignableFrom(table.getInputFileFormatClass())) {
+        LOG.warn("skip.footer.line.count is only valid for TextInputFormat "
+            + "files, ignoring the value.");
+        footerCount = 0;
+      }

Review comment:
       seems to be a duplicate block ; you could move it into a method




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