Skip to content

Type ARRAY cannot be used in SELECT DISTINCT #487

@NBorge

Description

@NBorge

What happened?

Mismatch in output between BigQuery and BigQuery-emulator when running SELECT DISTINCT * FROM (SELECT [0]).

What did you expect to happen?

Expected output:
+-------+
| f0_ |
+-------+
| ["0"] |
+-------+

Actual output:
BigQuery error in query operation: Error processing job [...]: failed to analyze: Column 1 of type ARRAY cannot be used in SELECT DISTINCT [at 1:17]

How can we reproduce it (as minimally and precisely as possible)?

bq query --api http://0.0.0.0:9050 --project_id=test --nouse_legacy_sql "SELECT DISTINCT * FROM (SELECT [0])"
bq query --project_id=test --nouse_legacy_sql "SELECT DISTINCT * FROM (SELECT [0])"

Anything else we need to know?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions