> 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`? > > Marta Kuczora wrote: > 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.
Makes sense, thanks for the information Marta. - Sahil ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/65952/#review198796 ----------------------------------------------------------- On March 8, 2018, 9:40 a.m., Marta Kuczora wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/65952/ > ----------------------------------------------------------- > > (Updated March 8, 2018, 9:40 a.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/HiveMetaStore.java > 662de9a > > 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/3/ > > > Testing > ------- > > Run the TestDropPartitions tests. > > > Thanks, > > Marta Kuczora > >