Skip to content

Expression functions should fail when given parameters are not what they expect #9824

@jihoonson

Description

@jihoonson

Affected Version

All versions since Druid expression was introduced.

Description

Each expression function can take different parameters depending on their implementation. For now, they just assume that the passed parameters are something what they want but never validate them. For example, strlen() function expects a single-valued parameter, but you can still do strlen(['a', 'b', 'c']) in your query which returns a string length of a hex string of an array currently. Instead, they should validate the given parameters before evaluating the expression, probably in validateArguments().

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions