> On March 7, 2018, 5:06 p.m., Sahil Takiar wrote:
> >

Thanks a lot Sahil for the review.


> On March 7, 2018, 5:06 p.m., Sahil Takiar wrote:
> > standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
> > Lines 996 (patched)
> > <https://reviews.apache.org/r/65952/diff/1/?file=1972255#file1972255line996>
> >
> >     Why do this validation in `HiveMetaStoreClient` rather than 
> > `HiveMetaStore`?

I did it there, because the PartitionDropOptions parameter is not sent to 
HiveMetaStore, only the boolean values from it.
The dropPartition method in the HiveMetaStoreClient looked like this:

  public boolean dropPartition(String db_name, String tbl_name,
      List<String> part_vals, PartitionDropOptions options) throws TException {
      
    return dropPartition(db_name, tbl_name, part_vals, options.deleteData,
                         options.purgeData? 
getEnvironmentContextWithIfPurgeSet() : null);
  }
  
And the NPE occurred when called options.deleteData in the dropPartition method 
call.


> On March 7, 2018, 5:06 p.m., Sahil Takiar wrote:
> > standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
> > Lines 1006 (patched)
> > <https://reviews.apache.org/r/65952/diff/1/?file=1972255#file1972255line1006>
> >
> >     Do the other parameters need to be checked?

You are right, we can check the other parameters too.


- Marta


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


On March 7, 2018, 3:48 p.m., Marta Kuczora wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65952/
> -----------------------------------------------------------
> 
> (Updated March 7, 2018, 3:48 p.m.)
> 
> 
> Review request for hive, Peter Vary and Adam Szita.
> 
> 
> Bugs: HIVE-18898
>     https://issues.apache.org/jira/browse/HIVE-18898
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> The TestDropPartitions tests revealed that NPE is thrown if the 
> dropPartition(String db_name, String tbl_name, List<String> part_vals, 
> PartitionDropOptions options) method is called with null options and with a 
> part_vals list which contains null elements.
> 
> 
> Diffs
> -----
> 
>   
> standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
>  3128089 
>   
> standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestDropPartitions.java
>  4d94ebf 
> 
> 
> Diff: https://reviews.apache.org/r/65952/diff/1/
> 
> 
> Testing
> -------
> 
> Run the TestDropPartitions tests.
> 
> 
> Thanks,
> 
> Marta Kuczora
> 
>

Reply via email to