deniskuzZ commented on code in PR #5328:
URL: https://github.com/apache/hive/pull/5328#discussion_r1700055681


##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveStorageHandler.java:
##########
@@ -839,9 +857,31 @@ default Partition 
getPartition(org.apache.hadoop.hive.ql.metadata.Table table, M
    */
   default List<Partition> 
getPartitions(org.apache.hadoop.hive.ql.metadata.Table table, 
       Map<String, String> partitionSpec) throws SemanticException {
+    return getPartitions(table, partitionSpec, true);
+  }
+
+  /**
+   * Returns a list of partitions based on table and partial partition 
specification.
+   * @param table {@link org.apache.hadoop.hive.ql.metadata.Table} table 
metadata stored in Hive Metastore
+   * @param partitionSpec Map of Strings {@link java.util.Map} partition 
specification
+   * @param latestSpecOnly Specifies if to return only partitions for the 
latest partition spec
+   * @return List of Partitions {@link 
org.apache.hadoop.hive.ql.metadata.Partition}
+   * @throws SemanticException {@link 
org.apache.hadoop.hive.ql.parse.SemanticException}
+   */
+  default List<Partition> 
getPartitions(org.apache.hadoop.hive.ql.metadata.Table table,
+      Map<String, String> partitionSpec, boolean latestSpecOnly) throws 
SemanticException {
     throw new UnsupportedOperationException("Storage handler does not support 
getting partitions for a table.");
   }
 
+  default boolean isPartitioned(org.apache.hadoop.hive.ql.metadata.Table 
table) {

Review Comment:
   i don't think it should be here -> IcebergTableUtil



##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveStorageHandler.java:
##########
@@ -839,9 +857,31 @@ default Partition 
getPartition(org.apache.hadoop.hive.ql.metadata.Table table, M
    */
   default List<Partition> 
getPartitions(org.apache.hadoop.hive.ql.metadata.Table table, 
       Map<String, String> partitionSpec) throws SemanticException {
+    return getPartitions(table, partitionSpec, true);
+  }
+
+  /**
+   * Returns a list of partitions based on table and partial partition 
specification.
+   * @param table {@link org.apache.hadoop.hive.ql.metadata.Table} table 
metadata stored in Hive Metastore
+   * @param partitionSpec Map of Strings {@link java.util.Map} partition 
specification
+   * @param latestSpecOnly Specifies if to return only partitions for the 
latest partition spec
+   * @return List of Partitions {@link 
org.apache.hadoop.hive.ql.metadata.Partition}
+   * @throws SemanticException {@link 
org.apache.hadoop.hive.ql.parse.SemanticException}
+   */
+  default List<Partition> 
getPartitions(org.apache.hadoop.hive.ql.metadata.Table table,
+      Map<String, String> partitionSpec, boolean latestSpecOnly) throws 
SemanticException {
     throw new UnsupportedOperationException("Storage handler does not support 
getting partitions for a table.");
   }
 
+  default boolean isPartitioned(org.apache.hadoop.hive.ql.metadata.Table 
table) {
+    throw new UnsupportedOperationException("Storage handler does not support 
checking if table is partitioned.");
+  }
+
+  default boolean 
hasUndergonePartitionEvolution(org.apache.hadoop.hive.ql.metadata.Table table) {

Review Comment:
   same -> IcebergTableUtil



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to