You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/user/ppl/cmd/mvexpand.rst
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,10 +20,6 @@ Description
20
20
- Handles empty, null, and non-array fields gracefully.
21
21
- Works as a streaming/distributable command for performance and scalability.
22
22
23
-
Version
24
-
=======
25
-
3.3.0
26
-
27
23
Syntax
28
24
======
29
25
mvexpand <field> [limit=<int>]
@@ -48,6 +44,10 @@ Limitations
48
44
- For empty or null arrays, no rows are returned.
49
45
- Large arrays may be subject to resource/memory limits; exceeding them results in an error or warning.
50
46
47
+
Output ordering and default limit
48
+
--------------------------------
49
+
If no `limit` is specified, mvexpand expands all elements in the array (there is no implicit per-document cap). Elements are emitted in the same order they appear in the array (array iteration order). If the underlying field does not provide a defined order, the output order is undefined. Use `limit` to bound the number of expanded rows per document and to avoid resource issues on very large arrays.
50
+
51
51
Examples and Edge Cases
52
52
=======================
53
53
@@ -156,18 +156,18 @@ Output (example)::
156
156
157
157
Example 5: Large Arrays and Memory Limits
158
158
----------------------------------------
159
-
If an array exceeds configured memory/resource limits, mvexpand returns an error.
159
+
If an array is very large it can trigger engine/cluster resource limits (memory, circuit-breakers, or query execution limits). Note: this behavior is enforced by the underlying engine and cluster settings, not by a mvexpand-specific configuration.
160
160
161
-
Input document::
162
-
163
-
{ "ids": [1, 2, ..., 100000] }
161
+
To avoid failures when expanding large arrays:
162
+
- Use the `limit` parameter to restrict the number of expanded values per document (for example: `mvexpand field limit=1000`).
163
+
- Filter or narrow the input before expanding (use `where` and `fields` to reduce rows and columns).
164
+
- Tune cluster and SQL/PPL execution settings (circuit breakers, query size/timeouts, memory limits) appropriate for your deployment.
164
165
165
166
PPL query::
166
167
167
168
source=docs | mvexpand ids
168
169
169
170
Output (example)::
170
-
171
171
Error: Memory/resource limit exceeded while expanding field 'ids'. Please reduce the array size or specify a limit.
0 commit comments