Skip to content

doc bug: GROUP_ARRAY_INTERSECT example SQL does not match its output (version-3.x/2.1) #3886

@boluor

Description

@boluor

On the GROUP_ARRAY_INTERSECT page (aggregate-functions/group-array-intersect.md, version-3.x and version-2.1), the first example does not match its own output:

select c_array_string from group_array_intersect_test where id in (18, 20);
+------+---------------------------+
| id   | col                       |
+------+---------------------------+
|    1 | ["a", "b", "c", "d", "e"] |
|    2 | ["a", "b"]                |
|    3 | ["a", null]               |
+------+---------------------------+

The SQL selects a single column c_array_string with predicate id IN (18, 20), but the shown output has columns id | col and rows with id = 1, 2, 3 (which contradicts the IN (18, 20) filter). The SQL and the displayed result are inconsistent.

Suggested fix — make the SQL match the shown two-column output and rows, e.g.:

select id, col from group_array_intersect_test;

(The second example, select group_array_intersect(col) from group_array_intersect_test;["a"], is consistent and fine.)

Filing this separately so the example-SQL correction can be reviewed on its own; the missing CREATE TABLE setup for these pages is being handled in the Line-B setup PRs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions