ngsg commented on code in PR #5191:
URL: https://github.com/apache/hive/pull/5191#discussion_r1568322246
##########
ql/src/java/org/apache/hadoop/hive/ql/stats/StatsUtils.java:
##########
@@ -1736,6 +1749,13 @@ private static boolean
isWideningCast(ExprNodeGenericFuncDesc engfd) {
engfd.getTypeInfo());
}
+ private static boolean isColStatsReusableFunc(ExprNodeGenericFuncDesc engfd)
{
+ GenericUDF udf = engfd.getGenericUDF();
+ Class udfClass =
+ (udf instanceof GenericUDFBridge) ?
((GenericUDFBridge)udf).getUdfClass() : udf.getClass();
+ return udfClass == GenericUDFLower.class || udfClass ==
GenericUDFUpper.class;
Review Comment:
Thanks for sharing the examples. I moved the estimation logic to UDF side by
using `StatEstimatorProvider` interface.
--
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]