Skip to content

Numeric searches on attributes compare text: field:>100 matches 17.25, and field:[10 TO 20] errors #3692

Open

Description

@Aryainguz

What happened?

Comparison and range searches on an attribute (LogAttributes.x:>100, :<10, :[10 TO 20]) return wrong rows or fail. OTel attribute maps store every value as a String (Map(LowCardinality(String), String)), and the search compiles the comparison against the text value:

LogAttributes.infra.gc_pause_ms:>100
-> LogAttributes['infra.gc_pause_ms'] > '100'               -- string comparison
LogAttributes.infra.gc_pause_ms:[10 TO 20]
-> LogAttributes['infra.gc_pause_ms'] BETWEEN 10 AND 20     -- String vs UInt8
  • >, >=, <, <= compare lexicographically: '17.25' > '100' and '5' > '100' are true, while '150' > '20' is false. The results look plausible, so nothing tells the user they are wrong.
  • Ranges with numeric bounds fail: There is no supertype for types String, UInt8 because some of them are String/FixedString/Enum and some of them are not.

Expected: a numeric bound compares numerically, as the in-app syntax reference describes ranges ("Numeric range"). Saved searches and alerts that use these searches are affected the same way.

On the demo dataset, infra.gc_pause_ms never exceeds 50 in the last 15 minutes, yet LogAttributes.infra.gc_pause_ms:>100 returned 54,841 rows in the UI, all below 100.

Steps to reproduce

Reproduces on play.hyperdx.io? Didn't try; reproduced locally against the same demo server.

  1. Run yarn app:dev:local, open the app, and click Connect to Demo Server.
  2. Open Search with the Demo Logs source and the time range Last 15 minutes.
  3. Set SELECT to Timestamp, ServiceName, LogAttributes['infra.gc_pause_ms'] AS gc_pause_ms, Body so the value is visible.
  4. Search LogAttributes.infra.gc_pause_ms:>100 and press Enter. Rows come back with gc_pause_ms values such as 8.1, 16.13 and 32.
  5. Search LogAttributes.infra.gc_pause_ms:[10 TO 20]. The search fails with the "no supertype" error.

gc_pause_ms:>100 returns rows below 100:

image

gc_pause_ms:[10 TO 20] fails:

image

How are you running HyperDX?

Local mode (yarn app:dev:local) from main, connected to the demo server. Any source whose attributes are Map(..., String) is affected, which is the default ClickStack schema.

Where does it show up?

Search (Lucene), and everything built on the same query compiler: saved searches, alerts, chart filters.

Activity

  1. added
    bugSomething isn't working
    Needs FeedbackUnder discussion; not ready for a PR yet
    on Nov 17, 2026
  2. changed the title [-]Numeric searches on attributes compare text: `field:>100` matches 17.25, and `field:[10 TO 20]` error[/-] [+]Numeric searches on attributes compare text: `field:>100` matches 17.25, and `field:[10 TO 20]` errors[/+] on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs FeedbackUnder discussion; not ready for a PR yetbugSomething isn't workingexternal

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions