Github user sansanichfb commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/1224#discussion_r113576418
  
    --- Diff: 
pxf/pxf-hive/src/main/java/org/apache/hawq/pxf/plugins/hive/HiveDataFragmenter.java
 ---
    @@ -466,7 +466,14 @@ private boolean buildSingleFilter(Object filter,
          */
         @Override
         public FragmentsStats getFragmentsStats() throws Exception {
    -        throw new UnsupportedOperationException(
    -                "ANALYZE for Hive plugin is not supported");
    +        Metadata.Item tblDesc = 
HiveUtilities.extractTableFromName(inputData.getDataSource());
    +        Table tbl = HiveUtilities.getHiveTable(client, tblDesc);
    +        Metadata metadata = new Metadata(tblDesc);
    +        HiveUtilities.getSchema(tbl, metadata);
    +
    +        long split_count = 
Long.parseLong(tbl.getParameters().get("numFiles"));
    --- End diff --
    
    I think split size is configured by "mapred.max.split.size" property of a 
job, so if a file happens to be bigger than split size - we might have multiple 
splits per one file.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to