{
  "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.",
  "type" : "scalar",
  "name" : "trange",
  "description" : "Filters data for the given time range using the @timestamp attribute.",
  "signatures" : [
    {
      "params" : [
        {
          "name" : "start_time_or_offset",
          "type" : "date",
          "optional" : false,
          "description" : " Offset from NOW for the single parameter mode. Start time for two parameter mode.  In two parameter mode, the start time value can be a date string, date, date_nanos or epoch milliseconds. "
        },
        {
          "name" : "end_time",
          "type" : "date",
          "optional" : true,
          "description" : "Explicit end time that can be a date string, date, date_nanos or epoch milliseconds."
        }
      ],
      "variadic" : false,
      "returnType" : "boolean"
    },
    {
      "params" : [
        {
          "name" : "start_time_or_offset",
          "type" : "date_nanos",
          "optional" : false,
          "description" : " Offset from NOW for the single parameter mode. Start time for two parameter mode.  In two parameter mode, the start time value can be a date string, date, date_nanos or epoch milliseconds. "
        },
        {
          "name" : "end_time",
          "type" : "date_nanos",
          "optional" : true,
          "description" : "Explicit end time that can be a date string, date, date_nanos or epoch milliseconds."
        }
      ],
      "variadic" : false,
      "returnType" : "boolean"
    },
    {
      "params" : [
        {
          "name" : "start_time_or_offset",
          "type" : "date_period",
          "optional" : false,
          "description" : " Offset from NOW for the single parameter mode. Start time for two parameter mode.  In two parameter mode, the start time value can be a date string, date, date_nanos or epoch milliseconds. "
        }
      ],
      "variadic" : false,
      "returnType" : "boolean"
    },
    {
      "params" : [
        {
          "name" : "start_time_or_offset",
          "type" : "keyword",
          "optional" : false,
          "description" : " Offset from NOW for the single parameter mode. Start time for two parameter mode.  In two parameter mode, the start time value can be a date string, date, date_nanos or epoch milliseconds. "
        },
        {
          "name" : "end_time",
          "type" : "keyword",
          "optional" : true,
          "description" : "Explicit end time that can be a date string, date, date_nanos or epoch milliseconds."
        }
      ],
      "variadic" : false,
      "returnType" : "boolean"
    },
    {
      "params" : [
        {
          "name" : "start_time_or_offset",
          "type" : "long",
          "optional" : false,
          "description" : " Offset from NOW for the single parameter mode. Start time for two parameter mode.  In two parameter mode, the start time value can be a date string, date, date_nanos or epoch milliseconds. "
        },
        {
          "name" : "end_time",
          "type" : "long",
          "optional" : true,
          "description" : "Explicit end time that can be a date string, date, date_nanos or epoch milliseconds."
        }
      ],
      "variadic" : false,
      "returnType" : "boolean"
    },
    {
      "params" : [
        {
          "name" : "start_time_or_offset",
          "type" : "time_duration",
          "optional" : false,
          "description" : " Offset from NOW for the single parameter mode. Start time for two parameter mode.  In two parameter mode, the start time value can be a date string, date, date_nanos or epoch milliseconds. "
        }
      ],
      "variadic" : false,
      "returnType" : "boolean"
    }
  ],
  "examples" : [
    "FROM k8s\n| WHERE TRANGE(1h)\n| KEEP @timestamp",
    "FROM k8s\n| WHERE TRANGE(\"2024-05-10T00:17:14.000Z\", \"2024-05-10T00:18:33.000Z\")\n| SORT @timestamp\n| KEEP @timestamp\n| LIMIT 10",
    "FROM k8s\n| WHERE TRANGE(to_datetime(\"2024-05-10T00:17:14Z\"), to_datetime(\"2024-05-10T00:18:33Z\"))\n| SORT @timestamp\n| KEEP @timestamp\n| LIMIT 10",
    "FROM k8s\n| WHERE TRANGE(to_datetime(\"2024-05-10T00:17:14.000Z\"), to_datetime(\"2024-05-10T00:18:33.000Z\"))\n| SORT @timestamp\n| KEEP @timestamp\n| LIMIT 10",
    "FROM k8s\n| WHERE TRANGE(1715300236000, 1715300282000)\n| SORT @timestamp\n| KEEP @timestamp\n| LIMIT 10"
  ],
  "preview" : false,
  "snapshot_only" : false
}
