Skip to main content

Crate diesel_clickhouse

Crate diesel_clickhouse 

Source
Expand description

Diesel query-builder extensions for ClickHouse.

This crate follows the same shape as small Diesel extension crates such as diesel-paradedb: it adds typed AST nodes for SQL that Diesel does not know about natively. The ClickHouse backend is a lightweight SQL-rendering backend, so regular Diesel expressions can be rendered with ClickHouse-style identifiers and placeholders while ClickHouse-only functions, operators and trailing clauses compose with the usual select / filter / order calls.

§Quick start

use diesel::prelude::*;
use diesel_clickhouse::{
    count_if, format, limit_by_col, quantile, to_start_of_hour, ClickHouse,
    ClickHouseQueryDsl, Format,
};

let query = events::table
    .select((
        to_start_of_hour(events::created_at),
        count_if(events::success.eq(true)),
        quantile(0.95, events::latency_ms),
    ))
    .filter(events::tenant_id.eq("acme"))
    .group_by(to_start_of_hour(events::created_at))
    .order(to_start_of_hour(events::created_at).desc())
    .limit_by_col(10, "tenant_id")
    .format(Format::JsonEachRow);

let sql = diesel_clickhouse::to_sql(&query)?;

§Scope

This crate focuses on building ClickHouse SQL from Diesel ASTs and now includes an initial HTTP-backed ClickHouseConnection plus explicit ClickHouseConnectionOptions for idiomatic Diesel load/execute/batch_execute workflows. You can still execute rendered SQL through your ClickHouse client of choice when you need client-specific behavior.

§Guides

Long-form Markdown guides from ./docs/ are rendered under docs on docs.rs:

Modules§

docs
Long-form Markdown guides rendered in the rustdoc item tree.
sql_types
ClickHouse SQL-type markers for use in table! declarations and explicit select type annotations.

Structs§

AggregateBuilder
Builder for ClickHouse aggregate function names plus combinator suffixes.
AggregateCall
A ClickHouse aggregate call such as sumIf(x, cond) or avgOrNullIf(x, cond).
AggregateIfArgs
Existing aggregate arguments plus a trailing If condition.
AlterTable
ALTER TABLE ... statement with one operation.
ArrayJoin
FROM table ARRAY JOIN expr query source wrapper.
BinaryParametricAggregate
Renderer for ClickHouse parametric aggregates with two expression arguments: function(param, ...)(left, right).
BufferEngine
Buffer(database, table, ...) engine definition.
CastFunction
A ClickHouse cast-like function call with caller-provided result SQL type.
ClickHouse
Diesel backend marker for ClickHouse SQL rendering.
ClickHouseConnection
A synchronous Diesel connection for ClickHouse over HTTP.
ClickHouseConnectionOptions
Explicit configuration for establishing a ClickHouseConnection.
ClickHouseField
Field view returned from ClickHouseRow.
ClickHouseJoin
A ClickHouse-specific join source.
ClickHouseJoinBuilder
Builder for ClickHouse’s extended join syntax.
ClickHouseQueryBuilder
Query builder that renders ClickHouse-style SQL.
ClickHouseRow
Owned result row used by the ClickHouse connection.
ClickHouseTransactionManager
Transaction manager that makes unsupported ClickHouse transactions explicit.
ClickHouseTypeMetadata
Minimal type metadata used by the bind collector.
Column
One ClickHouse column definition.
CreateMaterializedView
CREATE MATERIALIZED VIEW ... AS SELECT ... statement.
CreateMaterializedViewBuilder
Builder for CREATE MATERIALIZED VIEW before the AS SELECT query is known.
CreateTable
CREATE TABLE ... statement.
DistributedEngine
Distributed(cluster, database, table[, sharding_key[, policy_name]]) engine definition.
EngineSetting
One SETTINGS name = value item in an engine definition.
FillBound
One optional WITH FILL bound.
Final
FROM table FINAL query source wrapper.
FormattedQuery
Query wrapper that appends a ClickHouse FORMAT clause.
GroupByAll
GROUP BY ALL marker.
GroupByModifier
Generic wrapper for ClickHouse-specific GROUP BY modifiers.
Grouping
GROUPING(expr, ...) scalar function.
GroupingSets
GROUP BY GROUPING SETS ((...), (...), ...) marker.
HigherOrderFunction
A higher-order function call of the shape function(lambda, expr).
IntoOutfileQuery
Query wrapper that appends ClickHouse’s INTO OUTFILE clause.
JoinOn
ON predicate join constraint.
JoinUsing
USING (columns...) join constraint.
JsonPathFunction
Render a JSON function with json[, indices_or_keys]... shape.
Lambda
Raw lambda expression used by higher-order ClickHouse functions.
LimitBy
Query wrapper that appends LIMIT ... BY ....
LimitWithTies
Query wrapper that appends WITH TIES after LIMIT.
MergeTree
MergeTree-family engine definition.
MutationAssignment
One column = expr assignment in an ALTER TABLE ... UPDATE mutation.
NestedField
One field in a ClickHouse Nested(...) DDL type.
NoAggregateArgs
No arguments, useful for count() and countIf(cond).
NoFillBound
Missing WITH FILL bound.
NoSampleOffset
No SAMPLE OFFSET clause.
NoWindowBindings
Empty named window binding list.
NoWindowFrame
Missing frame clause.
NoWindowOrder
Missing ORDER BY part.
NoWindowPartition
Missing PARTITION BY part.
NoWithBindings
Empty scalar WITH binding list.
OneAggregateArg
One aggregate argument.
Over
expr OVER (...) wrapper.
OverWindow
expr OVER window_name wrapper.
ParametricAggregate
Generic renderer for ClickHouse’s parametric aggregate syntax: function(param, ...)(expr).
Prewhere
FROM table PREWHERE predicate query source wrapper.
QualifyQuery
Query wrapper that appends QUALIFY predicate.
Sample
FROM table SAMPLE ratio [OFFSET offset] query source wrapper.
SampleOffset
OFFSET expr part of a ClickHouse SAMPLE clause.
Setting
One SETTINGS name = value entry. Use Setting::flag for ClickHouse’s boolean shorthand (SETTINGS some_flag).
SettingsQuery
Query wrapper that appends a ClickHouse SETTINGS clause.
TableIndex
One INDEX name expr TYPE ... [GRANULARITY n] definition in CREATE TABLE.
TableProjection
One PROJECTION name (SELECT ...) definition in CREATE TABLE or ALTER TABLE.
TwoAggregateArgs
Two aggregate arguments, e.g. argMax(arg, value).
VectorBytes
ClickHouse binary-vector reinterpret expression.
VectorLiteral
ClickHouse vector literal rendered as [x, y, ...].
VectorSimilarityIndex
Parameters for ClickHouse’s vector_similarity(...) skipping index.
WindowBinding
One named window binding plus previously declared bindings.
WindowFrame
ROWS or RANGE frame clause for a window specification.
WindowOrder
ORDER BY expr part.
WindowPartition
PARTITION BY expr part.
WindowQuery
Query wrapper that appends named window definitions.
WindowSpec
Inline window specification.
WithBinding
One scalar WITH expr AS alias binding plus previously declared bindings.
WithCteBinding
One WITH alias AS [MATERIALIZED] (subquery) binding.
WithFill
expr WITH FILL [FROM x] [TO y] [STEP z].
WithQuery
Query wrapper that prepends ClickHouse scalar WITH aliases.

Enums§

ArrayJoinKind
Which ClickHouse ARRAY JOIN form to render.
DataType
ClickHouse data type syntax for DDL.
EngineSettingValue
Literal value in a MergeTree SETTINGS clause.
Format
Supported ClickHouse output formats.
GroupByModifierKind
Which modifier syntax to render around or after the grouping expression.
IndexType
Supported ClickHouse table index type renderers.
JoinKind
ClickHouse join kind.
JoinModifier
Optional ClickHouse join result modifier.
JoinStrictness
ClickHouse join strictness modifier.
JsonPathSegment
One ClickHouse JSON path argument: either an object key or an array index.
OutfileCompression
Compression algorithms supported by ClickHouse INTO OUTFILE.
OutfileMode
Existing-file behavior for INTO OUTFILE.
PartitionExpr
ClickHouse partition expression for ALTER TABLE ... PARTITION operations.
SettingValue
Literal value in a ClickHouse SETTINGS clause.
TableEngine
Supported table engine builders.
VectorBytesEncoding
How the input expression should be decoded before reinterpretation.
VectorDistanceFunction
Distance functions accepted by vector_similarity(...) indexes.
VectorIndexAlgorithm
Vector index implementation.
VectorQuantization
Quantization values accepted by vector_similarity(...) indexes.
WindowFrameBound
One boundary in a ClickHouse window frame.
WindowFrameUnits
Window frame units.

Traits§

ClickHouseJoinDsl
Fluent .clickhouse_join(rhs) entry point.
ClickHouseQueryDsl
Extension methods for final ClickHouse query modifiers.
ClickHouseTextExpressionMethods
ClickHouse-specific methods for text predicates that Diesel does not expose generically.
GlobalInDsl
Fluent .global_in(rhs) for ClickHouse distributed subquery membership.
NotGlobalInDsl
Fluent .not_global_in(rhs) for GLOBAL NOT IN.
OverDsl
Fluent .over_ch(spec) and .over_window(name) helpers for window functions.

Functions§

abs
abs(expr).
accurate_cast
Render accurateCast(expr, 'Type') and mark the expression as SQL type ST.
accurate_cast_or_default
Render accurateCastOrDefault(expr, 'Type') and mark the expression as ST.
accurate_cast_or_null
Render accurateCastOrNull(expr, 'Type') as Nullable<ST>.
aggregate
Start a generic ClickHouse aggregate/combinator call.
aggregating_merge_tree
Start an AggregatingMergeTree engine definition.
all_partitions
Build ClickHouse’s PARTITION ALL expression where supported.
alter_table
Start an ALTER TABLE statement.
analysis_of_variance
analysisOfVariance(value, group_no).
any_last
anyLast(expr).
any_value
any(expr).
approx_top_sum
Build approx_top_sum(n)(value, weight).
approx_top_sum_with_reserved
Build approx_top_sum(n, reserved)(value, weight).
arg_max
argMax(arg, val).
arg_min
argMin(arg, val).
array_all
Render arrayAll(lambda, array).
array_concat
arrayConcat(left, right).
array_count
Render arrayCount(lambda, array).
array_distinct
arrayDistinct(array).
array_element
arrayElement(array, index).
array_exists
Render arrayExists(lambda, array).
array_filter
Render arrayFilter(lambda, array).
array_join
arrayJoin(array) — expression form of ClickHouse ARRAY JOIN.
array_join_clause
Wrap a table or subquery with ClickHouse’s ARRAY JOIN clause.
array_join_clause_as
Wrap a table or subquery with ARRAY JOIN expr AS alias.
array_map
Render arrayMap(lambda, array) returning the same array type as the input.
array_map_as
Render arrayMap(lambda, array) with an explicit result element type.
avg_if
avgIf(expr, predicate).
avg_merge
avgMerge(state).
avg_merge_state
avgMergeState(state).
avg_state
avgState(expr).
base64_decode
base64Decode(expr).
base64_encode
base64Encode(expr).
buffer
Build a Buffer(...) engine definition.
cast
Render CAST(expr, 'Type') and mark the expression as SQL type ST.
ceil
ceil(expr).
city_hash64
cityHash64(expr).
clickhouse_join
Start building a ClickHouse-specific join source.
collapsing_merge_tree
Start a CollapsingMergeTree(sign) engine definition.
concat
concat(left, right).
corr
corr(x, y).
cosine_distance
cosineDistance(vector1, vector2).
count_if
countIf(predicate).
count_merge
countMerge(state).
count_merge_state
countMergeState(state).
count_state
countState().
covar_pop
covarPop(x, y).
covar_pop_stable
covarPopStable(x, y).
covar_samp
covarSamp(x, y).
covar_samp_stable
covarSampStable(x, y).
create_materialized_view
Start a CREATE MATERIALIZED VIEW statement.
create_table
Start a CREATE TABLE statement.
cube
Render GROUP BY CUBE(expr).
cut_query_string
cutQueryString(url).
date_diff
dateDiff(unit, start, end).
date_trunc
dateTrunc(unit, expr).
dense_rank
dense_rank().
distributed
Build a Distributed(cluster, database, table) engine definition.
domain
domain(url).
domain_without_www
domainWithoutWWW(url).
empty
empty(expr).
farm_fingerprint64
farmFingerprint64(expr).
final_table
Wrap a table or subquery with ClickHouse’s FINAL modifier.
finalize_aggregation
finalizeAggregation(state).
first_significant_subdomain
firstSignificantSubdomain(url).
first_value
first_value(expr).
floor
floor(expr).
format
Append FORMAT <format> to a query.
greatest
greatest(left, right).
group_array
groupArray(expr).
group_array_if
groupArrayIf(expr, predicate).
group_array_merge
groupArrayMerge(state).
group_array_state
groupArrayState(expr).
group_by_all
Render GROUP BY ALL.
grouping
Render GROUPING(expr).
grouping_sets
Render GROUP BY GROUPING SETS ((col_a), (col_b), ()).
has
has(array, value).
has_all
hasAll(left, right).
has_any
hasAny(left, right).
hex
hex(expr).
histogram
Build a histogram(bins)(expr) aggregate expression.
if_
if(cond, then_expr, else_expr).
ilike
ilike(haystack, pattern) function form of haystack ILIKE pattern.
ilike_escape
ilike(haystack, pattern, escape) with a custom escape character.
int_div
intDiv(left, right).
into_outfile
Append ClickHouse’s INTO OUTFILE file_name clause to a query.
ipv4_num_to_string
IPv4NumToString(expr).
ipv4_string_to_num
IPv4StringToNum(expr).
ipv6_num_to_string
IPv6NumToString(expr).
is_ipv4_string
isIPv4String(expr).
is_ipv6_string
isIPv6String(expr).
is_not_null
isNotNull(expr).
is_null
isNull(expr).
is_valid_json
isValidJSON(json).
json_exists
JSON_EXISTS(json, path).
json_extract_bool
JSONExtractBool(json, key).
json_extract_bool_path
Render JSONExtractBool(json, path...).
json_extract_float
JSONExtractFloat(json, key).
json_extract_float_path
Render JSONExtractFloat(json, path...).
json_extract_int
JSONExtractInt(json, key).
json_extract_int_ci
JSONExtractIntCaseInsensitive(json, key).
json_extract_int_ci_path
Render JSONExtractIntCaseInsensitive(json, path...).
json_extract_int_path
Render JSONExtractInt(json, path...).
json_extract_raw
JSONExtractRaw(json, key).
json_extract_raw_ci
JSONExtractRawCaseInsensitive(json, key).
json_extract_raw_ci_path
Render JSONExtractRawCaseInsensitive(json, path...).
json_extract_raw_path
Render JSONExtractRaw(json, path...).
json_extract_string
JSONExtractString(json, key).
json_extract_string_ci
JSONExtractStringCaseInsensitive(json, key).
json_extract_string_ci_path
Render JSONExtractStringCaseInsensitive(json, path...).
json_extract_string_path
Render JSONExtractString(json, path...).
json_extract_uint
JSONExtractUInt(json, key).
json_extract_uint_path
Render JSONExtractUInt(json, path...).
json_has
JSONHas(json, key).
json_length
JSONLength(json).
json_query
JSON_QUERY(json, path).
json_value
JSON_VALUE(json, path).
l1_distance
L1Distance(vector1, vector2).
l1_norm
L1Norm(vector).
l2_distance
L2Distance(vector1, vector2).
l2_norm
L2Norm(vector).
lag
lag(expr).
lag_in_frame
lagInFrame(expr, offset, default).
lambda
Build a single-argument ClickHouse lambda, e.g. x -> x + 1.
lambda2
Build a two-argument ClickHouse lambda, e.g. (k, v) -> v > 0.
lambda_params
Build a ClickHouse lambda from an arbitrary parameter list.
last_value
last_value(expr).
lead
lead(expr).
lead_in_frame
leadInFrame(expr, offset, default).
least
least(left, right).
left_array_join_clause
Wrap a table or subquery with ClickHouse’s LEFT ARRAY JOIN clause.
left_array_join_clause_as
Wrap a table or subquery with LEFT ARRAY JOIN expr AS alias.
length
length(expr).
like
like(haystack, pattern) function form of haystack LIKE pattern.
like_escape
like(haystack, pattern, escape) with a custom escape character.
limit_by_col
Append LIMIT n BY column to a query.
linf_distance
LinfDistance(vector1, vector2).
linf_norm
LinfNorm(vector).
lower
lower(expr).
mann_whitney_u_test
mannWhitneyUTest(sample_data, sample_index).
map_apply
Render mapApply(lambda, map) returning the same map type as the input.
map_contains
mapContains(map, key).
map_filter
Render mapFilter(lambda, map).
map_from_arrays
mapFromArrays(keys, values).
map_keys
mapKeys(map).
map_values
mapValues(map).
max_if
maxIf(expr, predicate).
max_merge
maxMerge(state).
max_state
maxState(expr).
merge_tree
Start a MergeTree engine definition.
min_if
minIf(expr, predicate).
min_merge
minMerge(state).
min_state
minState(expr).
multi_fuzzy_match_all_indices
multiFuzzyMatchAllIndices(haystack, distance, patterns).
multi_fuzzy_match_any
multiFuzzyMatchAny(haystack, distance, patterns).
multi_fuzzy_match_any_index
multiFuzzyMatchAnyIndex(haystack, distance, patterns).
multi_match_all_indices
multiMatchAllIndices(haystack, patterns).
multi_match_any
multiMatchAny(haystack, patterns).
multi_match_any_index
multiMatchAnyIndex(haystack, patterns).
mutation_assignment
Build one ALTER TABLE ... UPDATE column = expr assignment.
not_empty
notEmpty(expr).
not_ilike
notILike(haystack, pattern) function form of haystack NOT ILIKE pattern.
not_ilike_escape
notILike(haystack, pattern, escape) with a custom escape character.
not_like
notLike(haystack, pattern) function form of haystack NOT LIKE pattern.
not_like_escape
notLike(haystack, pattern, escape) with a custom escape character.
partition_by
Build a window spec with PARTITION BY expr.
partition_expr
Build a raw partition expression for ALTER TABLE ... PARTITION operations.
partition_id
Build a PARTITION ID '...' expression.
position
position(haystack, needle).
prewhere
Wrap a table or subquery with ClickHouse’s PREWHERE clause.
projection
Build a ClickHouse table projection definition.
qualify
Append QUALIFY predicate to a query.
quantile
Build a quantile(level)(expr) aggregate expression.
quantile_deterministic
Build a quantileDeterministic(level)(expr, determinator) aggregate expression.
quantile_exact
Build a quantileExact(level)(expr) aggregate expression.
quantile_tdigest
Build a quantileTDigest(level)(expr) aggregate expression.
quantile_timing
Build a quantileTiming(level)(expr) aggregate expression.
quantiles
Build a quantiles(level, ...)(expr) aggregate expression.
quantiles_timing
Build a quantilesTiming(level, ...)(expr) aggregate expression.
rank
rank().
regexp_match
match(haystack, pattern).
replace_all
replaceAll(haystack, pattern, replacement).
replacing_merge_tree
Start a ReplacingMergeTree engine definition.
replacing_merge_tree_with
Start a ReplacingMergeTree(version) engine definition.
rollup
Render GROUP BY ROLLUP(expr).
round
round(expr).
row_number
row_number().
sample
Wrap a table or subquery with ClickHouse’s SAMPLE <ratio> modifier.
sample_offset
Wrap a table or subquery with SAMPLE <ratio> OFFSET <offset>.
settings
Append SETTINGS ... to a query.
simple_json_extract_float
simpleJSONExtractFloat(json, field_name).
simple_json_extract_int
simpleJSONExtractInt(json, field_name).
simple_json_extract_string
simpleJSONExtractString(json, field_name).
simple_json_has
simpleJSONHas(json, field_name).
sip_hash64
sipHash64(expr).
stddev_pop
stddevPop(x).
stddev_pop_stable
stddevPopStable(x).
stddev_samp
stddevSamp(x).
stddev_samp_stable
stddevSampStable(x).
substring
substring(expr, offset, length).
sum_if
sumIf(expr, predicate).
sum_merge
sumMerge(state).
sum_merge_state
sumMergeState(state).
sum_state
sumState(expr).
summing_merge_tree
Start a SummingMergeTree engine definition.
summing_merge_tree_with
Start a SummingMergeTree((columns...)) engine definition.
to_bool
toBool(expr).
to_date
toDate(expr).
to_date_time
toDateTime(expr).
to_date_time64
toDateTime64(expr, scale).
to_day_of_month
toDayOfMonth(expr).
to_float32
toFloat32(expr).
to_float64
toFloat64(expr).
to_float64_or_null
toFloat64OrNull(expr).
to_float64_or_zero
toFloat64OrZero(expr).
to_hour
toHour(expr).
to_int8
toInt8(expr).
to_int16
toInt16(expr).
to_int32
toInt32(expr).
to_int64
toInt64(expr).
to_int32_or_null
toInt32OrNull(expr).
to_int64_or_null
toInt64OrNull(expr).
to_int64_or_zero
toInt64OrZero(expr).
to_int128
toInt128(expr).
to_int256
toInt256(expr).
to_ipv4
toIPv4(expr).
to_ipv6
toIPv6(expr).
to_minute
toMinute(expr).
to_month
toMonth(expr).
to_sql
Render any Diesel AST node as ClickHouse SQL without the debug bind comment.
to_start_of_day
toStartOfDay(expr).
to_start_of_hour
toStartOfHour(expr).
to_start_of_minute
toStartOfMinute(expr).
to_start_of_month
toStartOfMonth(expr).
to_start_of_year
toStartOfYear(expr).
to_string
toString(expr).
to_uint8
toUInt8(expr).
to_uint16
toUInt16(expr).
to_uint32
toUInt32(expr).
to_uint64
toUInt64(expr).
to_uint32_or_null
toUInt32OrNull(expr).
to_uint64_or_null
toUInt64OrNull(expr).
to_uint64_or_zero
toUInt64OrZero(expr).
to_uint128
toUInt128(expr).
to_uint256
toUInt256(expr).
to_unix_timestamp
toUnixTimestamp(expr).
to_year
toYear(expr).
top_k
Build a topK(k)(expr) aggregate expression.
top_level_domain
topLevelDomain(url).
try_base64_decode
tryBase64Decode(expr).
unhex
unhex(expr).
uniq
uniq(expr).
uniq_exact
uniqExact(expr).
uniq_exact_if
uniqExactIf(expr, predicate).
uniq_exact_merge
uniqExactMerge(state).
uniq_exact_state
uniqExactState(expr).
uniq_if
uniqIf(expr, predicate).
uniq_merge
uniqMerge(state).
uniq_state
uniqState(expr).
upper
upper(expr).
url_fragment
fragment(url).
url_path
path(url).
url_path_full
pathFull(url).
url_protocol
protocol(url).
url_query_string
queryString(url).
var_pop
varPop(x).
var_pop_stable
varPopStable(x).
var_samp
varSamp(x).
var_samp_stable
varSampStable(x).
vector_f32
Build a ClickHouse array literal typed as Array(Float32).
vector_f64
Build a ClickHouse array literal typed as Array(Float64).
vector_f32_binary
Reinterpret a binary string expression as Array(Float32).
vector_f32_hex
Decode a hex string expression with unhex and reinterpret it as Array(Float32).
vector_f32_le_bytes
Convert f32 vector values into ClickHouse-compatible little-endian bytes.
vector_f32_le_hex
Convert f32 vector values into a lower-case hex string of little-endian bytes.
vector_f64_binary
Reinterpret a binary string expression as Array(Float64).
vector_f64_hex
Decode a hex string expression with unhex and reinterpret it as Array(Float64).
vector_f64_le_bytes
Convert f64 vector values into ClickHouse-compatible little-endian bytes.
vector_f64_le_hex
Convert f64 vector values into a lower-case hex string of little-endian bytes.
vector_similarity_index
Build a ClickHouse vector_similarity skipping index.
versioned_collapsing_merge_tree
Start a VersionedCollapsingMergeTree(sign, version) engine definition.
window
Append WINDOW name AS (spec) to a query.
window_order_by
Build a window spec with ORDER BY expr and no partition key.
with_alias
Prepend a scalar WITH expr AS alias binding to a query.
with_cte
Prepend a common table expression binding to a query.
with_fill
Wrap an ORDER BY expression with ClickHouse’s WITH FILL modifier.
with_materialized_cte
Prepend a materialized common table expression binding to a query.
with_ties
Append WITH TIES after a ClickHouse LIMIT clause.
with_totals
Render GROUP BY expr WITH TOTALS.
xx_hash64
xxHash64(expr).

Type Aliases§

ApproxTopSumItem
Result type returned by approx_top_sum for one value/weight pair.
ApproxTopSumResult
approx_top_sum result array element type.
ClickHouseCursor
Iterator returned by ClickHouseConnection load operations.
Histogram
histogram(bins)(expr) adaptive histogram aggregate.
HistogramBucket
SQL type of each tuple returned by ClickHouse histogram.
Quantile
quantile(level)(expr) — ClickHouse’s parametric approximate quantile.
RowsBetweenUnboundedPrecedingAndCurrentRow
Backwards-compatible name for the original frame helper return type.
abs
The return type of abs()
analysis_of_variance
The return type of analysis_of_variance()
any_last
The return type of any_last()
any_value
The return type of any_value()
arg_max
The return type of arg_max()
arg_min
The return type of arg_min()
array_concat
The return type of array_concat()
array_distinct
The return type of array_distinct()
array_element
The return type of array_element()
array_join
The return type of array_join()
avg_if
The return type of avg_if()
avg_merge
The return type of avg_merge()
avg_merge_state
The return type of avg_merge_state()
avg_state
The return type of avg_state()
base64_decode
The return type of base64_decode()
base64_encode
The return type of base64_encode()
ceil
The return type of ceil()
city_hash64
The return type of city_hash64()
concat
The return type of concat()
corr
The return type of corr()
cosine_distance
The return type of cosine_distance()
count_if
The return type of count_if()
count_merge
The return type of count_merge()
count_merge_state
The return type of count_merge_state()
count_state
The return type of count_state()
covar_pop
The return type of covar_pop()
covar_pop_stable
The return type of covar_pop_stable()
covar_samp
The return type of covar_samp()
covar_samp_stable
The return type of covar_samp_stable()
cut_query_string
The return type of cut_query_string()
date_diff
The return type of date_diff()
date_trunc
The return type of date_trunc()
dense_rank
The return type of dense_rank()
domain
The return type of domain()
domain_without_www
The return type of domain_without_www()
empty
The return type of empty()
farm_fingerprint64
The return type of farm_fingerprint64()
finalize_aggregation
The return type of finalize_aggregation()
first_significant_subdomain
The return type of first_significant_subdomain()
first_value
The return type of first_value()
floor
The return type of floor()
greatest
The return type of greatest()
group_array
The return type of group_array()
group_array_if
The return type of group_array_if()
group_array_merge
The return type of group_array_merge()
group_array_state
The return type of group_array_state()
has
The return type of has()
has_all
The return type of has_all()
has_any
The return type of has_any()
hex
The return type of hex()
if_
The return type of if_()
ilike
The return type of ilike()
ilike_escape
The return type of ilike_escape()
int_div
The return type of int_div()
ipv4_num_to_string
The return type of ipv4_num_to_string()
ipv4_string_to_num
The return type of ipv4_string_to_num()
ipv6_num_to_string
The return type of ipv6_num_to_string()
is_ipv4_string
The return type of is_ipv4_string()
is_ipv6_string
The return type of is_ipv6_string()
is_not_null
The return type of is_not_null()
is_null
The return type of is_null()
is_valid_json
The return type of is_valid_json()
json_exists
The return type of json_exists()
json_extract_bool
The return type of json_extract_bool()
json_extract_float
The return type of json_extract_float()
json_extract_int
The return type of json_extract_int()
json_extract_int_ci
The return type of json_extract_int_ci()
json_extract_raw
The return type of json_extract_raw()
json_extract_raw_ci
The return type of json_extract_raw_ci()
json_extract_string
The return type of json_extract_string()
json_extract_string_ci
The return type of json_extract_string_ci()
json_extract_uint
The return type of json_extract_uint()
json_has
The return type of json_has()
json_length
The return type of json_length()
json_query
The return type of json_query()
json_value
The return type of json_value()
l1_distance
The return type of l1_distance()
l1_norm
The return type of l1_norm()
l2_distance
The return type of l2_distance()
l2_norm
The return type of l2_norm()
lag
The return type of lag()
lag_in_frame
The return type of lag_in_frame()
last_value
The return type of last_value()
lead
The return type of lead()
lead_in_frame
The return type of lead_in_frame()
least
The return type of least()
length
The return type of length()
like
The return type of like()
like_escape
The return type of like_escape()
linf_distance
The return type of linf_distance()
linf_norm
The return type of linf_norm()
lower
The return type of lower()
mann_whitney_u_test
The return type of mann_whitney_u_test()
map_contains
The return type of map_contains()
map_from_arrays
The return type of map_from_arrays()
map_keys
The return type of map_keys()
map_values
The return type of map_values()
max_if
The return type of max_if()
max_merge
The return type of max_merge()
max_state
The return type of max_state()
min_if
The return type of min_if()
min_merge
The return type of min_merge()
min_state
The return type of min_state()
multi_fuzzy_match_all_indices
The return type of multi_fuzzy_match_all_indices()
multi_fuzzy_match_any
The return type of multi_fuzzy_match_any()
multi_fuzzy_match_any_index
The return type of multi_fuzzy_match_any_index()
multi_match_all_indices
The return type of multi_match_all_indices()
multi_match_any
The return type of multi_match_any()
multi_match_any_index
The return type of multi_match_any_index()
not_empty
The return type of not_empty()
not_ilike
The return type of not_ilike()
not_ilike_escape
The return type of not_ilike_escape()
not_like
The return type of not_like()
not_like_escape
The return type of not_like_escape()
position
The return type of position()
rank
The return type of rank()
regexp_match
The return type of regexp_match()
replace_all
The return type of replace_all()
round
The return type of round()
row_number
The return type of row_number()
simple_json_extract_float
The return type of simple_json_extract_float()
simple_json_extract_int
The return type of simple_json_extract_int()
simple_json_extract_string
The return type of simple_json_extract_string()
simple_json_has
The return type of simple_json_has()
sip_hash64
The return type of sip_hash64()
stddev_pop
The return type of stddev_pop()
stddev_pop_stable
The return type of stddev_pop_stable()
stddev_samp
The return type of stddev_samp()
stddev_samp_stable
The return type of stddev_samp_stable()
substring
The return type of substring()
sum_if
The return type of sum_if()
sum_merge
The return type of sum_merge()
sum_merge_state
The return type of sum_merge_state()
sum_state
The return type of sum_state()
to_bool
The return type of to_bool()
to_date
The return type of to_date()
to_date_time
The return type of to_date_time()
to_date_time64
The return type of to_date_time64()
to_day_of_month
The return type of to_day_of_month()
to_float32
The return type of to_float32()
to_float64
The return type of to_float64()
to_float64_or_null
The return type of to_float64_or_null()
to_float64_or_zero
The return type of to_float64_or_zero()
to_hour
The return type of to_hour()
to_int8
The return type of to_int8()
to_int16
The return type of to_int16()
to_int32
The return type of to_int32()
to_int64
The return type of to_int64()
to_int32_or_null
The return type of to_int32_or_null()
to_int64_or_null
The return type of to_int64_or_null()
to_int64_or_zero
The return type of to_int64_or_zero()
to_int128
The return type of to_int128()
to_int256
The return type of to_int256()
to_ipv4
The return type of to_ipv4()
to_ipv6
The return type of to_ipv6()
to_minute
The return type of to_minute()
to_month
The return type of to_month()
to_start_of_day
The return type of to_start_of_day()
to_start_of_hour
The return type of to_start_of_hour()
to_start_of_minute
The return type of to_start_of_minute()
to_start_of_month
The return type of to_start_of_month()
to_start_of_year
The return type of to_start_of_year()
to_string
The return type of to_string()
to_uint8
The return type of to_uint8()
to_uint16
The return type of to_uint16()
to_uint32
The return type of to_uint32()
to_uint64
The return type of to_uint64()
to_uint32_or_null
The return type of to_uint32_or_null()
to_uint64_or_null
The return type of to_uint64_or_null()
to_uint64_or_zero
The return type of to_uint64_or_zero()
to_uint128
The return type of to_uint128()
to_uint256
The return type of to_uint256()
to_unix_timestamp
The return type of to_unix_timestamp()
to_year
The return type of to_year()
top_level_domain
The return type of top_level_domain()
try_base64_decode
The return type of try_base64_decode()
unhex
The return type of unhex()
uniq
The return type of uniq()
uniq_exact
The return type of uniq_exact()
uniq_exact_if
The return type of uniq_exact_if()
uniq_exact_merge
The return type of uniq_exact_merge()
uniq_exact_state
The return type of uniq_exact_state()
uniq_if
The return type of uniq_if()
uniq_merge
The return type of uniq_merge()
uniq_state
The return type of uniq_state()
upper
The return type of upper()
url_fragment
The return type of url_fragment()
url_path
The return type of url_path()
url_path_full
The return type of url_path_full()
url_protocol
The return type of url_protocol()
url_query_string
The return type of url_query_string()
var_pop
The return type of var_pop()
var_pop_stable
The return type of var_pop_stable()
var_samp
The return type of var_samp()
var_samp_stable
The return type of var_samp_stable()
xx_hash64
The return type of xx_hash64()