Skip to content

DSL Coverage

Roy Brondgeest edited this page Oct 29, 2018 · 10 revisions

DSL Functionality overview

Version

Scala DSL v0.8.0

Clickhouse v18.12.17

Intro

Below is a list of categories of functionalities offered by the ClickHouse SQL language.

For each category a link to a detail page is provided, as well as an indication of the coverage of the DSL for this functionality.

Queries

Functionality DSL Doc Clickhouse Doc Supported Comments
SELECT Doc Yes
- DISTINCT Yes
- FROM Yes
- FINAL Yes
- ARRAY JOIN No Supported as a column operator [link]
- JOIN Yes With the exception of GLOBAL JOIN
- PREWHERE No Low hanging fruit
- WHERE Yes
- GROUP BY Yes
- HAVING Yes
- ORDER BY Yes
- LIMIT Yes
- LIMIT n BY No
- UNION ALL Yes
- INTO OUTFILE No
- FORMAT Yes
- SELECT … IN … Yes
INSERT See comments Experimental, with a hardwired dependency on Spray JSON
CREATE DATABASE Yes
CREATE TABLE Doc Yes Currently doesnt use the DSL tokenizer, but depends on .toString(), will be changed in the future
CREATE VIEW No
ATTACH No
DROP No
DETACH No
RENAME No
ALTER Yes
SHOW DATABASES/TABLES etc. No
DESCRIBE TABLE No
EXISTS No
USE See comments Not needed. We choose to define the database trough an implicit val` in the clickhouse client
SET No
OPTIMIZE No
KILL QUERY No

Operators

Functionality DSL Doc Clickhouse Doc Supported Comments
Access operators Doc Partly Used in some array functions as part of their API, you can use the "command style" alternative in the DSL
Numeric negation operator Yes
Multiplication and division operators Yes
Addition and subtraction operators Yes
Comparison operators Yes
Operators for working with data sets Yes
Logical negation operator Yes
Logical AND operator Yes
Logical OR operator Yes
Conditional operator Yes
Conditional expression Yes
Concatenation operator Yes
Lambda creation operator Yes Used in partial functions as part of their API
Array creation operator Yes Used in functions accepting collections as part of their API, you can use the command style alternative in the DSL
Tuple creation operator Yes Used in IN functions as part of their API

Column functions

Functionality DSL Doc Clickhouse Doc Supported Comments
Arithmetic functions Doc Yes
Comparison functions Yes
Logical functions Yes
Type conversion functions Yes
Functions for working with dates and times Yes The DSL offers a timeseries function to group results by a custom interval [link]
Functions for working with strings Yes
Functions for searching strings Yes
Functions for searching and replacing in strings Yes
Conditional functions Yes
Mathematical functions Yes
Rounding functions Yes
Functions for working with arrays Yes
Functions for splitting and merging strings and arrays Yes
Bit functions Yes
Hash functions Yes
Functions for generating pseudo-random numbers Yes
Encoding functions Yes
Functions for working with URLs Yes
Functions for working with IP addresses Yes
Functions for working with JSON. Yes
Higher-order functions Yes
Other functions Yes
Functions for working with external dictionaries Yes
Functions for working with Yandex.Metrica dictionaries Yes
Functions for implementing the IN operator Yes
arrayJoin function Yes

Aggregation Functions

Functionality DSL Doc Clickhouse Doc Supported Comments
Aggregate functions Doc Yes
Aggregate function combinators Yes
Parametric aggregate functions No

Todo pages:

Clone this wiki locally