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.
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:
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 2What alternatives have you considered?
N/A
Do you have any additional context?
Add any other context or screenshots about the feature request here.