{
  "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.",
  "type" : "scalar",
  "name" : "to_ip",
  "description" : "Converts an input string to an IP value.",
  "signatures" : [
    {
      "params" : [
        {
          "name" : "field",
          "type" : "ip",
          "optional" : false,
          "description" : "Input value. The input can be a single- or multi-valued column or an expression."
        }
      ],
      "variadic" : false,
      "returnType" : "ip"
    },
    {
      "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" : "ip"
    },
    {
      "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" : "ip"
    }
  ],
  "examples" : [
    "ROW str1 = \"1.1.1.1\", str2 = \"foo\"\n| EVAL ip1 = TO_IP(str1), ip2 = TO_IP(str2)\n| WHERE CIDR_MATCH(ip1, \"1.0.0.0/8\")",
    "ROW s = \"1.1.010.1\" | EVAL ip = TO_IP(s, {\"leading_zeros\":\"octal\"})",
    "ROW s = \"1.1.010.1\" | EVAL ip = TO_IP(s, {\"leading_zeros\":\"decimal\"})"
  ],
  "preview" : false,
  "snapshot_only" : false
}
