Skip to content

[ESQL] Support basic casting for date nanos #109990

@not-napoleon

Description

@not-napoleon

Description

The fastest way to get most functions to work with date nanos at all will be to cast them to a type we already support well. We'll also need a way to cast back to date nanos. There are three functions wrapped up into this ticket, because I think we'll need all three at once to sensibly test any of them. I might be wrong about that though, in which case we could break this down further.

  • TO_DATETIME should accept a date nanos and return a millisecond resolution time (NOTE: We need to have a rounding convention here)
  • TO_LONG should accept a date nanos and return the same value as a long
  • TO_STRING should accept a date nanos and return a formatted string. We have [ESQL] Support passing Date_Nanos to Date_Format function #109994 for full formatting on date nanos, but providing basic TO_STRING support early will help with debugging.

Metadata

Metadata

Assignees

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