Skip to content

Commit

Permalink
docs(clickhouse): entry into the accursed
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Sep 19, 2024
1 parent 1c91d65 commit 419dd7b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/reference/cursed_knowledge.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,13 @@ execution engines.
* Impala's `LTRIM` and `RTRIM` functions accept a _set_ of whitespace (or other)
characters to remove from the left-, and right-hand-side sides of the input
string, but the `TRIM` function only removes _spaces_.

## ClickHouse

* [ClickHouse's random number generating
functions](https://clickhouse.com/docs/en/sql-reference/functions/random-functions)
are considered in [common subexpression
elimination](https://en.wikipedia.org/wiki/Common_subexpression_elimination),
so to get two unique random numbers, users must defeat that optimization.
This is done by passing **any** argument to those functions. It's left as an
exercise for the reader to figure out how to generate two unique inputs.

0 comments on commit 419dd7b

Please sign in to comment.