thomasrebele commented on code in PR #6374:
URL: https://github.com/apache/hive/pull/6374#discussion_r2968250691
##########
ql/src/java/org/apache/hadoop/hive/ql/parse/ColumnStatsAutoGatherContext.java:
##########
@@ -319,36 +337,61 @@ public boolean isInsertInto() {
return isInsertInto;
}
- public static boolean canRunAutogatherStats(Operator curr) {
+ public static boolean isColumnSupported(ObjectInspector.Category category,
Supplier<TypeInfo> typeInfoSupplier) {
+ if (category != ObjectInspector.Category.PRIMITIVE) {
+ return false;
+ }
+ TypeInfo t = typeInfoSupplier.get();
+ switch (((PrimitiveTypeInfo) t).getPrimitiveCategory()) {
+ case BOOLEAN:
+ case BYTE:
+ case SHORT:
+ case INT:
+ case LONG:
+ case TIMESTAMP:
+ case FLOAT:
+ case DOUBLE:
+ case STRING:
+ case CHAR:
+ case VARCHAR:
+ case BINARY:
+ case DECIMAL:
+ case DATE:
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ public static boolean canRunAutogatherStats(Table destinationTable, Operator
curr) {
Review Comment:
I'll add the parametrized type for the Opterator parameters during the next
update of the PR.
--
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]