Skip to content

Possible unhandled null value in ExpressionSelectors #4666

@xanec

Description

@xanec

https://github.com/druid-io/druid/blob/f18cc5df97e5826c2dd8ffafba9fcb69d10a4d44/processing/src/main/java/io/druid/segment/virtual/ExpressionSelectors.java#L108-L112

The above call baseSelector.get().asDouble() in ExpressionSelectors.makeDoubleColumnSelector may result in NullPointerException if the returned ExprEval contains null value.

Note that in comparison, a similar call in ExpressionSelectors.makeFloatColumnSelector is handled as follows:

https://github.com/druid-io/druid/blob/f18cc5df97e5826c2dd8ffafba9fcb69d10a4d44/processing/src/main/java/io/druid/segment/virtual/ExpressionSelectors.java#L83-L87

I believe this is introduced in #4491 (@b-slim)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions