You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE] Add max/min functions for eval command #4341
Is your feature request related to a problem?
PPL currently lacks MAX and MIN functions for the eval command/a way to find the maximum or minimum value among multiple arguments (fields, constants) within a single row.
What solution would you like?
Add MAX(x, y, ...) and MIN(x, y, ...) functions to PPL's eval command that:
Accept variable number of arguments
Support mixed data types (numbers and strings) with behavior:
MAX: Prefers strings over numbers when types are mixed
MIN: Prefers numbers over strings when types are mixed
Example usage:
source=logs | eval result = MAX(2, 100, "banana", "apple") | fields result -> result would be "banana"
source=logs | eval result = MIN(2, 100, "banana", "apple") | fields result -> result would be 2
What alternatives have you considered?
N/A
Do you have any additional context?
Add any other context or screenshots about the feature request here.
Activity