elastic/elasticsearch

ESQL should support a humanize option to quickly render values in human readable way.

Open

#136.533 aperta il 14 ott 2025

Vedi su GitHub
 (17 commenti) (0 reazioni) (0 assegnatari)Java (25.882 fork)batch import
:Analytics/ES|QL>enhancementTeam:Analyticsgood first issue

Metriche repository

Star
 (76.700 star)
Metriche merge PR
 (Merge medio 2g) (1000 PR mergiate in 30 g)

Descrizione

Description

When you deal with any sort of value that is in a unit that is not easy to comprehend as a human, like duration_in_nanos it is annoying to always have to manually perform some calculations like eval duration = duration_in_nanos / 1000 / 1000 to get to seconds resolution.

I would like to have a simple to_human(field, unit) and a to_human(field, unit, target_unit) conversion. It should support:

  • Duration
  • Bits (1000)
  • Bytes (1024)
  • Percent

We need two signatures for that function since sometimes I might not want to rely on the auto conversation and I want to fix everything to be displayed in GB. Otherwise I might end up with values of KB, MB, TB and so on in the same column.

Guida contributor