InvisibleProgrammer commented on code in PR #4131:
URL: https://github.com/apache/hive/pull/4131#discussion_r1165171624
##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveStorageHandler.java:
##########
@@ -245,6 +248,44 @@ default boolean canProvideBasicStatistics() {
return false;
}
+ /**
+ * Return some col statistics (Lower bounds, Upper bounds, Null value
counts, NaN, total counts) calculated by
+ * the underlying storage handler implementation.
+ * @param table
+ * @return A List of Column Statistics Objects, can be null
+ */
+ default
List<ColumnStatisticsObj>getColStatistics(org.apache.hadoop.hive.ql.metadata.Table
table) {
+ return null;
+ }
+
+ /**
+ * Set column stats for non-native tables
+ * @param table
+ * @param colStats
+ * @return boolean
+ */
+ default boolean setColStatistics(org.apache.hadoop.hive.ql.metadata.Table
table,
+ List<ColumnStatistics> colStats) {
+ return false;
+ }
+
+ /**
+ * Check if the storage handler can provide col statistics.
+ * @param tbl
+ * @return true if the storage handler can supply the col statistics
+ */
+ default boolean
canProvideColStatistics(org.apache.hadoop.hive.ql.metadata.Table tbl) {
+ return false;
+ }
+
+ /**
+ * Check if the storage handler can set col statistics.
+ * @return true if the storage handler can set the col statistics
+ */
+ default boolean canSetColStatistics(org.apache.hadoop.hive.ql.metadata.Table
tbl) {
Review Comment:
I don't know the good answer, I'm just thinking:
If we have a pair of methods like `canSetColStatistics` and
`setColStatistics`. Can we do that in a way that doesn't allow to call
`setColStatistics` if they cannot be set?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]