Skip to content

Commit 2e83a02

Browse files
committed
update doc
Signed-off-by: Kai Huang <ahkcs@amazon.com>
1 parent e9e27a4 commit 2e83a02

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

docs/user/ppl/cmd/bin.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ bin <field> [span=<interval>] [minspan=<interval>] [bins=<count>] [aligntime=(ea
3535

3636
* minspan: optional. The minimum interval size for automatic span calculation. Cannot be used with span or bins parameters.
3737
* bins: optional. The maximum number of equal-width bins to create. Cannot be used with span or minspan parameters. The bins parameter must be between 2 and 50000 (inclusive).
38+
39+
**Limitation**: The bins parameter on timestamp fields has the following requirements:
40+
41+
1. **Pushdown must be enabled**: Controlled by ``plugins.calcite.pushdown.enabled`` (enabled by default). When pushdown is disabled, use the ``span`` parameter instead (e.g., ``bin @timestamp span=5m``).
42+
2. **Timestamp field must be used as an aggregation bucket**: The binned timestamp field must be used in a ``stats`` aggregation (e.g., ``source=events | bin @timestamp bins=3 | stats count() by @timestamp``). Using bins on timestamp fields outside of aggregation buckets is not supported.
3843
* aligntime: optional. Align the bin times for time-based fields. Valid only for time-based discretization. Options:
3944

4045
* earliest: Align bins to the earliest timestamp in the data
@@ -345,4 +350,3 @@ PPL query::
345350
| 1 | 20-30 |
346351
| 3 | 30-40 |
347352
+---------+---------+
348-

0 commit comments

Comments
 (0)