1
0
mirror of https://github.com/uptrace/go-clickhouse.git synced 2025-07-01 00:25:06 +02:00
Files
go-clickhouse/ch/testdata/snapshots/TestQuery-16
Antony Dovgal 0f4c06861f fix: move FINAL modifier to the right place (#52)
The documentation (http://devdoc.net/database/ClickhouseDocs_19.4.1.3-docs/query_language/select/)
says FINAL has to be placed right after the table name, before SAMPLE:
  SELECT [DISTINCT] expr_list
    [FROM [db.]table | (subquery) | table_function] [FINAL]
    [SAMPLE sample_coeff]

At the moment it's appended to the end of the query which results in
invalid queries being generated when there are WHERE, ORDER BY or any
other clauses used.
2022-11-23 13:03:58 +02:00

2 lines
127 B
Plaintext

SELECT "model"."id", "model"."string", "model"."bytes" FROM "models" AS "model" FINAL WHERE (id = 1) GROUP BY "id" ORDER BY id