-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/66800/#review202832
-----------------------------------------------------------



Do you have some way of testing that all the objects are actually deleted from 
the DB?


standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java
Line 655 (original), 667 (patched)
<https://reviews.apache.org/r/66800/#comment284842>

    Is it existing bug in the code?



standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java
Lines 1090 (patched)
<https://reviews.apache.org/r/66800/#comment284844>

    I think this can be done in a cleaner way using Java stream API. From 
https://docs.oracle.com/javase/8/docs/api/java/util/StringJoiner.html:
    
    `
    List<Integer> numbers = Arrays.asList(1, 2, 3, 4);
     String commaSeparatedNumbers = numbers.stream()
         .map(i -> i.toString())
         .collect(Collectors.joining(", "));
    `



standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java
Lines 2567 (patched)
<https://reviews.apache.org/r/66800/#comment284845>

    Why do we need to do it here? We are done already



standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java
Lines 2686 (patched)
<https://reviews.apache.org/r/66800/#comment284846>

    Do we need to do it here?



standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java
Lines 2721 (patched)
<https://reviews.apache.org/r/66800/#comment284847>

    Do we need to do it here?



standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java
Lines 2761 (patched)
<https://reviews.apache.org/r/66800/#comment284850>

    It is usually better to use !isEmpty() in such cases.
    Also, it may be easier to read if you do
    
    ```
    if (danglingColumnDescriptorIdList.isEmpty()) {
      return;
    }
    ```


- Alexander Kolbasov


On May 9, 2018, 1 p.m., Peter Vary wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66800/
> -----------------------------------------------------------
> 
> (Updated May 9, 2018, 1 p.m.)
> 
> 
> Review request for hive, Alexander Kolbasov, Alan Gates, Marta Kuczora, Adam 
> Szita, and Vihang Karajgaonkar.
> 
> 
> Bugs: HIVE-6980
>     https://issues.apache.org/jira/browse/HIVE-6980
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> First version of the patch.
> 
> Splits getPartitionsViaSqlFilterInternal to:
> 
> getPartitionIdsViaSqlFilter - which returns the partition ids
> getPartitionsFromPartitionIds - which returns the partition data for the 
> partitions
> Creates dropPartitionsByPartitionIds which drops the partitions by directSQL 
> commands
> 
> Creates a dropPartitionsViaSqlFilter using getPartitionIdsViaSqlFilter and 
> dropPartitionsByPartitionIds.
> 
> Modifies the ObjectStore to drop partitions with directsql if possible.
> 
> 
> Diffs
> -----
> 
>   
> standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java
>  4e0e887 
>   
> standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java
>  6645e55 
> 
> 
> Diff: https://reviews.apache.org/r/66800/diff/3/
> 
> 
> Testing
> -------
> 
> Run the TestDropPartition tests, also checked the database manually, that no 
> object left in the database
> 
> 
> Thanks,
> 
> Peter Vary
> 
>

Reply via email to