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
|
@Override
|
||||||
public double getDouble()
|
public double getDouble()
|
||||||
{
|
{
|
||||||
final Double number = baseSelector.get().asDouble();
|
final ExprEval exprEval = baseSelector.get();
|
||||||
return number != null ? number.doubleValue() : nullValue;
|
return exprEval.isNull() ? nullValue : exprEval.asDouble();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue