{
  "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.",
  "type" : "scalar",
  "name" : "to_integer",
  "description" : "Converts an input value to an integer value.\nIf the input parameter is of a date type, its value will be interpreted as milliseconds\nsince the Unix epoch, converted to integer.\nBoolean `true` will be converted to integer `1`, `false` to `0`.",
  "signatures" : [
    {
      "params" : [
        {
          "name" : "field",
          "type" : "boolean",
          "optional" : false,
          "description" : "Input value. The input can be a single- or multi-valued column or an expression."
        }
      ],
      "variadic" : false,
      "returnType" : "integer"
    },
    {
      "params" : [
        {
          "name" : "field",
          "type" : "counter_integer",
          "optional" : false,
          "description" : "Input value. The input can be a single- or multi-valued column or an expression."
        }
      ],
      "variadic" : false,
      "returnType" : "integer"
    },
    {
      "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" : "integer"
    },
    {
      "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" : "integer"
    },
    {
      "params" : [
        {
          "name" : "field",
          "type" : "integer",
          "optional" : false,
          "description" : "Input value. The input can be a single- or multi-valued column or an expression."
        }
      ],
      "variadic" : false,
      "returnType" : "integer"
    },
    {
      "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" : "integer"
    },
    {
      "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" : "integer"
    },
    {
      "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" : "integer"
    },
    {
      "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" : "integer"
    }
  ],
  "examples" : [
    "ROW long = [5013792, 2147483647, 501379200000]\n| EVAL int = TO_INTEGER(long)"
  ],
  "preview" : false,
  "snapshot_only" : false
}
