@Override public List<Partition> dropPartitions(String dbName, String tblName, List<ObjectPair<Integer, byte[]>> partExprs, boolean deleteData, boolean ifExists, boolean needResult) throws NoSuchObjectException, MetaException, TException { return dropPartitions(getDefaultCatalog(conf), dbName, tblName, partExprs, PartitionDropOptions.instance() .deleteData(deleteData) .ifExists(ifExists) .returnResults(needResult)); }
/** * Drop partitions based on an expression. * @param catName catalog name. * @param dbName database name. * @param tblName table name. * @param partExprs I don't understand this fully, so can't completely explain it. The second * half of the object pair is an expression used to determine which partitions * to drop. The first half has something to do with archive level, but I * don't understand what. I'm also not sure what happens if you pass multiple * expressions. * @param deleteData whether to delete the data as well as the metadata. * @param ifExists if true, it is not an error if no partitions match the expression(s). * @param needResults if true, the list of deleted partitions will be returned, if not, null * will be returned. * @return list of deleted partitions, if needResults is true * @throws NoSuchObjectException No partition matches the expression(s), and ifExists was false. * @throws MetaException error access the RDBMS or storage. * @throws TException Thrift transport error. */ default List<Partition> dropPartitions(String catName, String dbName, String tblName, List<ObjectPair<Integer, byte[]>> partExprs, boolean deleteData, boolean ifExists, boolean needResults) throws NoSuchObjectException, MetaException, TException { return dropPartitions(catName, dbName, tblName, partExprs, PartitionDropOptions.instance() .deleteData(deleteData) .ifExists(ifExists) .returnResults(needResults)); }
@Override public List<Partition> dropPartitions(String dbName, String tblName, List<ObjectPair<Integer, byte[]>> partExprs, boolean deleteData, boolean ifExists, boolean needResult) throws NoSuchObjectException, MetaException, TException { return dropPartitions(dbName, tblName, partExprs, PartitionDropOptions.instance() .deleteData(deleteData) .ifExists(ifExists) .returnResults(needResult)); }
@Override public List<Partition> dropPartitions(String dbName, String tblName, List<ObjectPair<Integer, byte[]>> partExprs, boolean deleteData, boolean ignoreProtection, boolean ifExists, boolean needResult) throws NoSuchObjectException, MetaException, TException { return dropPartitions(dbName, tblName, partExprs, PartitionDropOptions.instance() .deleteData(deleteData) .ignoreProtection(ignoreProtection) .ifExists(ifExists) .returnResults(needResult)); }
@Override public List<Partition> dropPartitions(String dbName, String tblName, List<ObjectPair<Integer, byte[]>> partExprs, boolean deleteData, boolean ignoreProtection, boolean ifExists, boolean needResult) throws NoSuchObjectException, MetaException, TException { return dropPartitions(dbName, tblName, partExprs, PartitionDropOptions.instance() .deleteData(deleteData) .ignoreProtection(ignoreProtection) .ifExists(ifExists) .returnResults(needResult)); }
/** * Drop partitions based on an expression. * @param catName catalog name. * @param dbName database name. * @param tblName table name. * @param partExprs I don't understand this fully, so can't completely explain it. The second * half of the object pair is an expression used to determine which partitions * to drop. The first half has something to do with archive level, but I * don't understand what. I'm also not sure what happens if you pass multiple * expressions. * @param deleteData whether to delete the data as well as the metadata. * @param ifExists if true, it is not an error if no partitions match the expression(s). * @param needResults if true, the list of deleted partitions will be returned, if not, null * will be returned. * @return list of deleted partitions, if needResults is true * @throws NoSuchObjectException No partition matches the expression(s), and ifExists was false. * @throws MetaException error access the RDBMS or storage. * @throws TException Thrift transport error. */ default List<Partition> dropPartitions(String catName, String dbName, String tblName, List<ObjectPair<Integer, byte[]>> partExprs, boolean deleteData, boolean ifExists, boolean needResults) throws NoSuchObjectException, MetaException, TException { return dropPartitions(catName, dbName, tblName, partExprs, PartitionDropOptions.instance() .deleteData(deleteData) .ifExists(ifExists) .returnResults(needResults)); }