Skip to content

[BUG] bin Command Validation enhancement on Non-Numeric Fields #4590

Closed

Description

@ahkcs

Description

When the bin command is applied to a non-numeric field while using numeric span parameters (span, minspan, etc.), the command currently fails with an unclear or misleading error message.
Users cannot easily identify that the root cause is the use of a non-numeric field for numeric binning.

The expected behavior is that the bin command should gracefully skip numeric binning for non-numeric fields and preserve the original field values instead of throwing an error.
This ensures query continuity and prevents unexpected pipeline failures in mixed-type datasets.


Steps to Reproduce

  1. Execute a query that applies numeric binning to a non-numeric field:

    {
      "query": "source=otellogs | bin severityText minspan=10"
    }

    (severityText is a non-numeric field, e.g., categorical text.)

  2. Observe the returned error message.


Expected Behavior

  • The bin command should continue without error and return the original non-numeric value
    Example:
    With this data
{\"_time\":1753722000, \"value\":\"1\"},
{\"_time\":1753722017, \"value\":2},
{\"_time\":1753722023, \"value\":\"invalid\"}

If we use

bin value span=10 | table _time, value, category | sort _time

Result:

_time value category
2025-07-28 17:00:00 0-10 D
2025-07-28 17:00:17 0-10 D
2025-07-28 17:00:23 invalid D

Actual Behavior

  • The current behavior is to throw error message

Activity

  1. added
    bug
    on Oct 16, 2025
  2. added
    PPL
    and removed on Oct 21, 2025
  3. added
    calcite
    on Oct 21, 2025
  4. moved this from Not Started to Done in PPL Trackeron Oct 30, 2025
  5. ahkcs commented on Oct 30, 2025

    @ahkcs
    CollaboratorAuthor

    Potential solution: #4349

  6. added
    error-experience
    on Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

PPLbugcalciteerror-experience

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions