You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This DuckDB extension implements various macros using ClickHouse SQL syntax, making it easier to transition knowledge, users and scripts between the two database systems.
Since ClickHouse has hundreds of commands, this extension is a perpetual WIP.
JOIN & HELP
If you're a ClickHouse SQL wizard (or just have lots of patience) you can join the fun by contributing to this project..
Here's how you can help this extension by adding, fixing or extending its scope of SQL macros:
Find a ClickHouse function you are interested into the in functions list
Find if DuckDB functions offer a viable method to alias the target function
Create the macro and extend to neighboring class functions with similar scope
Calculates the sum of corresponding values of two tuples of the same size.
Syntax
tuplePlus(tuple1, tuple2)
Arguments
tuple1 — First tuple. [Tuple](https://clickhouse.com/docs/en/sql-reference/data-types/tuple).
tuple2 — Second tuple. [Tuple](https://clickhouse.com/docs/en/sql-reference/data-types/tuple).
chsql
Hello stranger!
This DuckDB extension implements various macros using ClickHouse SQL syntax, making it easier to transition knowledge, users and scripts between the two database systems.
JOIN & HELP
If you're a ClickHouse SQL wizard (or just have lots of patience) you can join the fun by contributing to this project..
Here's how you can help this extension by adding, fixing or extending its scope of SQL macros:
Examples
Here's a couple random examples:
ClickHouse
tuplePlus
Calculates the sum of corresponding values of two tuples of the same size.
Syntax
Arguments
Returned value
Tuple with the sum. Tuple.
Example
Query:
Result:
DuckDB Macro
Let's convert our function to a DuckDB equivalent macro using a lambda function or any other method:
Example
Query:
Result:
Submit a PR
tests/sql
directory.👍 That's it! Simpler functions are trivial while others are puzzles. Have fun!
The text was updated successfully, but these errors were encountered: