You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by chunhui-shi <gi...@git.apache.org> on 2016/12/06 19:28:32 UTC

[GitHub] drill pull request #654: DRILL-5032: Drill query on hive parquet table faile...

Github user chunhui-shi commented on a diff in the pull request:

    https://github.com/apache/drill/pull/654#discussion_r91152465
  
    --- Diff: contrib/storage-hive/core/src/main/java/org/apache/drill/exec/store/hive/HiveUtilities.java ---
    @@ -398,17 +399,13 @@ public static void addConfToJob(final JobConf job, final Properties properties)
        * Wrapper around {@link MetaStoreUtils#getPartitionMetadata(Partition, Table)} which also adds parameters from table
        * to properties returned by {@link MetaStoreUtils#getPartitionMetadata(Partition, Table)}.
        *
    -   * @param partition {@link Partition} instance
    -   * @param table {@link Table} instance
    +   * @param partition the source of partition level parameters
    +   * @param table     the source of table level parameters
        * @return properties
        */
    -  public static Properties getPartitionMetadata(final Partition partition, final Table table) {
    +  public static Properties getPartitionMetadata(final HivePartition partition, final HiveTable table) {
         final Properties properties;
    -    // exactly the same column lists for partitions and table
    -    // stored only in table to reduce physical plan serialization
    -    if (partition.getSd().getCols() == null) {
    -      partition.getSd().setCols(table.getSd().getCols());
    -    }
    +    restoreColumns(table, partition);
    --- End diff --
    
    could this restoreColumns fail the purpose of this fix? Since it is setting columns back to each partition, if getPartitionMetadata was called before the final physical plan generated, then these columns could be printed out to the plan again, could you check this possibility?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---