> On Jan. 19, 2018, 1:02 p.m., Adam Szita wrote:
> > Overall looks good, I just have small observations.
> > 
> > One more nitpick: some helper methods could be static e.g. 
> > getYearAndMonthCols

Thanks a lot Adam for the review.

Good point, changed the getYearAndMonthPartCols and getYearPartCol helper 
methods to be static.


> On Jan. 19, 2018, 1:02 p.m., Adam Szita wrote:
> > standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestDropPartitions.java
> > Lines 64 (patched)
> > <https://reviews.apache.org/r/65213/diff/1/?file=1941487#file1941487line64>
> >
> >     Is there any reason to use 10? Supplying -1 would return all partitions 
> > which I think was the original intent in the test cases below (in 
> > listPartitions calls).

No specific reason, I just missed this. This is a good point, thanks for it.


> On Jan. 19, 2018, 1:02 p.m., Adam Szita wrote:
> > standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestDropPartitions.java
> > Lines 165 (patched)
> > <https://reviews.apache.org/r/65213/diff/1/?file=1941487#file1941487line165>
> >
> >     createTable is called here twice because it's also in @Before. Does 
> > this mean it overrides the existing table with the supplied tableParams?

In this test case I wanted to create a different table with the 
"auto.purge=true" table parameter. This table has the name "purge_test". In the 
@Before method, I create the default table with the name 
"test_drop_part_table". So there will be two tables in this test case.


> On Jan. 19, 2018, 1:02 p.m., Adam Szita wrote:
> > standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestDropPartitions.java
> > Lines 539-553 (patched)
> > <https://reviews.apache.org/r/65213/diff/1/?file=1941487#file1941487line539>
> >
> >     Guava lib has a handy method for these use cases:
> >     
> >     <E> ArrayList<E> com.google.common.collect.Lists.newArrayList(E... 
> > elements)
> >     
> >     ...which is doing exactly the same + optimising on initial list size.

That's an excellent point, thanks a lot for the hint. I didn't know this lib 
before.


- Marta


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


On Jan. 18, 2018, 1:11 p.m., Marta Kuczora wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65213/
> -----------------------------------------------------------
> 
> (Updated Jan. 18, 2018, 1:11 p.m.)
> 
> 
> Review request for hive, Peter Vary and Adam Szita.
> 
> 
> Bugs: HIVE-18479
>     https://issues.apache.org/jira/browse/HIVE-18479
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> The following methods of IMetaStoreClient are covered by this test.
> - boolean dropPartition(String, String, List<String>, boolean)
> - boolean dropPartition(String, String, List<String>, PartitionDropOptions)
> - boolean dropPartition(String, String, String, boolean)
> 
> The test covers not just the happy pathes, but the edge cases as well.
> 
> 
> Diffs
> -----
> 
>   
> standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestDropPartitions.java
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/65213/diff/1/
> 
> 
> Testing
> -------
> 
> Run the tests
> 
> 
> Thanks,
> 
> Marta Kuczora
> 
>

Reply via email to