mirror of https://github.com/apache/druid.git
Minor fix in ExpressionSelectors to avoid potential NPE. (#4669)
This commit is contained in:
parent
7454fd86a0
commit
42569e65e2
|
@ -107,8 +107,8 @@ public class ExpressionSelectors
|
|||
@Override
|
||||
public double getDouble()
|
||||
{
|
||||
final Double number = baseSelector.get().asDouble();
|
||||
return number != null ? number.doubleValue() : nullValue;
|
||||
final ExprEval exprEval = baseSelector.get();
|
||||
return exprEval.isNull() ? nullValue : exprEval.asDouble();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue