Skip to content

ESQL: replace Float/Double NaN with null #98698

@costin

Description

@costin

Description

Floating number (Float and Double) provide a special, out of band value - NaN, Not-a-Number.

This occurs typically when dividing a number by zero; integer numbers don't have one and instead thrown an error.
To make things consistent, I propose we treat and convert NaN internally to null so it never reaches the user.
Several arguments to support this:

  • JSON doesn't allow NaN (nor -Inf or +Inf for that matter)
  • ES doesn't allow ingestion of non-finite double or float (regardless of whether JSON is used or not) - see NumberFieldMapper for floats and doubles.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions