{
  "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.",
  "type" : "grouping",
  "name" : "tbucket",
  "description" : "Creates groups of values - buckets - out of a @timestamp attribute. The size of the buckets must be provided directly.",
  "signatures" : [
    {
      "params" : [
        {
          "name" : "buckets",
          "type" : "date_period",
          "optional" : false,
          "description" : "Desired bucket size."
        }
      ],
      "variadic" : false,
      "returnType" : "date"
    },
    {
      "params" : [
        {
          "name" : "buckets",
          "type" : "date_period",
          "optional" : false,
          "description" : "Desired bucket size."
        }
      ],
      "variadic" : false,
      "returnType" : "date_nanos"
    },
    {
      "params" : [
        {
          "name" : "buckets",
          "type" : "time_duration",
          "optional" : false,
          "description" : "Desired bucket size."
        }
      ],
      "variadic" : false,
      "returnType" : "date"
    },
    {
      "params" : [
        {
          "name" : "buckets",
          "type" : "time_duration",
          "optional" : false,
          "description" : "Desired bucket size."
        }
      ],
      "variadic" : false,
      "returnType" : "date_nanos"
    }
  ],
  "examples" : [
    "FROM sample_data\n| STATS min = MIN(@timestamp), max = MAX(@timestamp) BY bucket = TBUCKET(1 hour)\n| SORT min",
    "FROM sample_data\n| STATS min = MIN(@timestamp), max = MAX(@timestamp) BY bucket = TBUCKET(\"1 hour\")\n| SORT min"
  ],
  "preview" : false,
  "snapshot_only" : false
}
