{
  "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.",
  "type" : "scalar",
  "name" : "to_date_nanos",
  "description" : "Converts an input to a nanosecond-resolution date value (aka date_nanos).",
  "note" : "The range for date nanos is 1970-01-01T00:00:00.000000000Z to 2262-04-11T23:47:16.854775807Z, attempting to convert values outside of that range will result in null with a warning.  Additionally, integers cannot be converted into date nanos, as the range of integer nanoseconds only covers about 2 seconds after epoch.",
  "signatures" : [
    {
      "params" : [
        {
          "name" : "field",
          "type" : "date",
          "optional" : false,
          "description" : "Input value. The input can be a single- or multi-valued column or an expression."
        }
      ],
      "variadic" : false,
      "returnType" : "date_nanos"
    },
    {
      "params" : [
        {
          "name" : "field",
          "type" : "date_nanos",
          "optional" : false,
          "description" : "Input value. The input can be a single- or multi-valued column or an expression."
        }
      ],
      "variadic" : false,
      "returnType" : "date_nanos"
    },
    {
      "params" : [
        {
          "name" : "field",
          "type" : "double",
          "optional" : false,
          "description" : "Input value. The input can be a single- or multi-valued column or an expression."
        }
      ],
      "variadic" : false,
      "returnType" : "date_nanos"
    },
    {
      "params" : [
        {
          "name" : "field",
          "type" : "keyword",
          "optional" : false,
          "description" : "Input value. The input can be a single- or multi-valued column or an expression."
        }
      ],
      "variadic" : false,
      "returnType" : "date_nanos"
    },
    {
      "params" : [
        {
          "name" : "field",
          "type" : "long",
          "optional" : false,
          "description" : "Input value. The input can be a single- or multi-valued column or an expression."
        }
      ],
      "variadic" : false,
      "returnType" : "date_nanos"
    },
    {
      "params" : [
        {
          "name" : "field",
          "type" : "text",
          "optional" : false,
          "description" : "Input value. The input can be a single- or multi-valued column or an expression."
        }
      ],
      "variadic" : false,
      "returnType" : "date_nanos"
    },
    {
      "params" : [
        {
          "name" : "field",
          "type" : "unsigned_long",
          "optional" : false,
          "description" : "Input value. The input can be a single- or multi-valued column or an expression."
        }
      ],
      "variadic" : false,
      "returnType" : "date_nanos"
    }
  ],
  "examples" : [
    "FROM date_nanos\n| WHERE MV_MIN(nanos) < TO_DATE_NANOS(\"2023-10-23T12:27:28.948Z\")\n    AND millis > \"2000-01-01\"\n| SORT nanos DESC"
  ],
  "preview" : false,
  "snapshot_only" : false
}
