Add BigQuery -> ClickHouse SQL reference#6224
Conversation
|
@Blargian is attempting to deploy a commit to the ClickHouse Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
dhtclk
left a comment
There was a problem hiding this comment.
Just a few comments (mostly British spellings)
Co-authored-by: Dominic Tran <dominic.tran@clickhouse.com>
Co-authored-by: Shaun Struwig <41984034+Blargian@users.noreply.github.com>
…e table notes to make it more clear they belong to the row above
| | [`JSON`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#json_type) | [`JSON`](/sql-reference/data-types/newjson) or [`String`](/sql-reference/data-types/string) | `JSON` is preferred; `String` with [`JSONExtract*`](/sql-reference/functions/json-functions) accessors works as a fallback | | ||
| | [`NUMERIC`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#decimal_types) | [`Decimal(P, S)`](/sql-reference/data-types/decimal) | Sized variants `Decimal32(S)` / `Decimal64(S)` / `Decimal128(S)` are also available | | ||
| | [`RANGE`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#range_type) | No equivalent | Store `(start, end)` columns or a `Tuple(start, end)` | | ||
| | [`STRING`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#string_type) | [`String`](/sql-reference/data-types/string) | Optionally wrap in [`LowCardinality(String)`](/sql-reference/data-types/lowcardinality) for columns with few distinct values (enums, status codes, country codes). String functions are byte-based; the [String family](/sql-reference/functions/string-functions) has `UTF8` variants where relevant | |
There was a problem hiding this comment.
Feedback from Amy: We should probably flag this as a performance optimization. This might be because I'm in dark mode but I didn't realize those data types were actually links.
| <tr> | ||
| <td colSpan={2}> | ||
|
|
||
| Location is a service-level decision in ClickHouse Cloud. |
There was a problem hiding this comment.
Feedback from Amy: decision? maybe configuration?
|
|
||
| ## DDL statements {#ddl-statements} | ||
|
|
||
| ### Schemas and databases {#ddl-schemas} |
There was a problem hiding this comment.
Feedback from Amy: missing the three part namespace callout
| <tr> | ||
| <td colSpan={2}> | ||
|
|
||
| An engine and an `ORDER BY` are required for `MergeTree`-family tables; pick the columns that match the query access pattern. See [Sparse primary indexes](/guides/best-practices/sparse-primary-indexes). |
There was a problem hiding this comment.
Feedback from Amy: I think we need a sentence as to why order by is so crucial in clickhouse. it would make the partition comment make more sense. Also link out to what even is a mergetree
| </tbody> | ||
| </table> | ||
|
|
||
| ### Roles {#dcl-roles} |
There was a problem hiding this comment.
Feedback from Amy: I think this table is unnecessary - I think you could just do a sentence and link to the create role/user docs
| </tbody> | ||
| </table> | ||
|
|
||
| ### Pipe syntax {#pipe-syntax} |
There was a problem hiding this comment.
Feedback from Amy: you could just say we don't support this?
Summary
Adds a BigQuery to ClickHouse SQL reference guide
Checklist