Skip to content

Add common comparison scalar functions for filterConfig during ingestion #8488

@npawar

Description

@npawar

The filter config needs a function that evaluates to boolean https://docs.pinot.apache.org/developers/advanced/ingestion-level-transformations#filtering
So far, we were able to use Groovy for expressing such fucntions. Starting release 0.10.0, Groovy is disabled by default, and also due to security concerns might not be the best choice to use even if explicitly enabled.
This leaves us with only being able to use regular Scalar Functions in filterFunction. However, we don't have sufficient scalar functions which evaluate to boolean (only ones I could find are startsWith and endsWith in StringFunctions.

Goal: Add all commonly used comparison functions (like equals, no equals, greater than, less than etc). We should be able to express such functions completely without Groovy "filterFunction": "Groovy({timestamp < 1589007600000}, timestamp)", "filterFunction": "Groovy({(campaign == \"X\" || campaign == \"Y\") && prices.sum() < 100}, prices, campaign)"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions