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
* Fix for Multisearch and Append command
Signed-off-by: Kai Huang <ahkcs@amazon.com>
# Conflicts:
# docs/category.json
* fix tests
Signed-off-by: Kai Huang <ahkcs@amazon.com>
* fix test
Signed-off-by: Kai Huang <ahkcs@amazon.com>
* remove error location
Signed-off-by: Kai Huang <ahkcs@amazon.com>
* Allow same SqlTypeName but with different nullability to be merged
Signed-off-by: Kai Huang <ahkcs@amazon.com>
* Update error message
Signed-off-by: Kai Huang <ahkcs@amazon.com>
---------
Signed-off-by: Kai Huang <ahkcs@amazon.com>
(cherry picked from commit 0dd5949)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Copy file name to clipboardExpand all lines: docs/user/ppl/cmd/append.rst
+5-20Lines changed: 5 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,11 @@ append <sub-search>
24
24
25
25
* sub-search: mandatory. Executes PPL commands as a secondary search.
26
26
27
+
Limitations
28
+
===========
29
+
30
+
* **Schema Compatibility**: When fields with the same name exist between the main search and sub-search but have incompatible types, the query will fail with an error. To avoid type conflicts, ensure that fields with the same name have the same data type, or use different field names (e.g., by renaming with ``eval`` or using ``fields`` to select non-conflicting columns).
31
+
27
32
Example 1: Append rows from a count aggregation to existing search result
This example shows how column type conflicts are handled when appending results. Same name columns with different types will generate two different columns in appended result.
71
-
72
-
PPL query::
73
-
74
-
os> source=accounts | stats sum(age) as sum by gender, state | sort -sum | head 5 | append [ source=accounts | stats sum(age) as sum by gender | eval sum = cast(sum as double) ];
* **Minimum Subsearches**: At least two subsearches must be specified
62
-
* **Schema Compatibility**: When fields with the same name exist across subsearches but have incompatible types, the system automatically resolves conflicts by renaming the conflicting fields. The first occurrence retains the original name, while subsequent conflicting fields are renamed with a numeric suffix (e.g., ``age`` becomes ``age0``, ``age1``, etc.). This ensures all data is preserved while maintaining schema consistency.
58
+
* **Schema Compatibility**: When fields with the same name exist across subsearches but have incompatible types, the query will fail with an error. To avoid type conflicts, ensure that fields with the same name have the same data type across all subsearches, or use different field names (e.g., by renaming with ``eval`` or using ``fields`` to select non-conflicting columns).
In this example, the ``age`` field has type ``bigint`` in accounts but type ``string`` in locations. The system keeps the first occurrence as ``age`` (bigint) and renames the second occurrence to ``age0`` (string), preserving all data while avoiding type conflicts.
0 commit comments