ujc714 commented on a change in pull request #2034:
URL: https://github.com/apache/hive/pull/2034#discussion_r586308451
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/udf/UDFSubstr.java
##########
@@ -174,8 +174,10 @@ public StatEstimator getStatEstimator() {
}
private Optional<Double> getRangeWidth(Range range) {
- if (range.minValue != null && range.maxValue != null) {
- return Optional.of(range.maxValue.doubleValue() -
range.minValue.doubleValue());
+ if (range != null) {
Review comment:
Thanks for your suggestion. Added test case substr_estimate_range.q.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]