id
stringlengths
36
36
document
stringlengths
3
3k
metadata
stringlengths
23
69
embeddings
listlengths
384
384
f2903322-dbcf-4a2e-be32-f42405f2895b
description: 'Documentation for Tuple functions' sidebar_label: 'Tuples' slug: /sql-reference/functions/tuple-functions title: 'Tuple functions' doc_type: 'reference' :::note The documentation below is generated from the system.functions system table. ::: flattenTuple {#flattenTuple} Introduced in: v22.6 ...
{"source_file": "tuple-functions.md"}
[ -0.010104358196258545, -0.02724589966237545, -0.008745167404413223, 0.001117940992116928, -0.06457912176847458, -0.016317088156938553, 0.05519040673971176, 0.03658483177423477, -0.05648723989725113, -0.029783038422465324, -0.016798174008727074, -0.006043759640306234, 0.03213062137365341, -...
1cb1f03a-a8ad-40dc-b8d1-8f077346b731
response title=Response (0.5, 0.6666666666666666) tupleDivideByNumber {#tupleDivideByNumber} Introduced in: v21.11 Returns a tuple with all elements divided by a number. :::note Division by zero will return inf . ::: Syntax sql tupleDivideByNumber(tuple, number) Arguments tuple β€” Tuple to divide. T...
{"source_file": "tuple-functions.md"}
[ -0.008803822100162506, 0.002575923455879092, -0.046095576137304306, 0.03780587017536163, -0.0030255138408392668, -0.05632432550191879, 0.07043305039405823, -0.01721682772040367, -0.008622557856142521, -0.00828440673649311, -0.015749119222164154, -0.06540010124444962, 0.023567013442516327, ...
8260d7aa-743a-43e7-89a5-60a82d3b625b
text β”Œβ”€t1────┬─t2─────┬─t3─────┬─t4─────┬─t5─────┐ β”‚ UInt8 β”‚ UInt16 β”‚ UInt32 β”‚ UInt64 β”‚ UInt64 β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ::: Syntax sql tupleHammingDistance(t1, t2) Arguments t1 β€” First tuple. Tuple(*) t2 β€” Second tuple. Tuple(*) Returned value Returns the Hamming distance. ...
{"source_file": "tuple-functions.md"}
[ 0.035951245576143265, -0.014092638157308102, -0.020610274747014046, -0.026437371969223022, -0.06154466047883034, -0.02146477811038494, 0.07259281724691391, -0.027961019426584244, -0.045231182128190994, -0.013426785357296467, 0.023252535611391068, -0.04557515308260918, 0.06587565690279007, ...
aefaadd0-10ab-468e-83a4-03bbf30a61a6
With decimals sql title=Query SELECT tupleIntDivByNumber((15.2, 10.7, 5.5), 5.8) response title=Response (2, 1, 0) tupleIntDivOrZero {#tupleIntDivOrZero} Introduced in: v23.8 Like tupleIntDiv performs integer division of a tuple of numerators and a tuple of denominators, and returns a tuple of the quotients...
{"source_file": "tuple-functions.md"}
[ -0.002540664281696081, 0.019908636808395386, -0.013204703107476234, 0.021255919709801674, 0.0013381298631429672, -0.07566613703966141, 0.07959666103124619, 0.029687467962503433, -0.03659491240978241, -0.02199675887823105, -0.04213374853134155, -0.10732690244913101, 0.003903285600244999, -0...
76bbc161-c42a-4dbb-9495-ec7e1e5866c9
response title=Response (-1, -1) tupleModulo {#tupleModulo} Introduced in: v23.8 Returns a tuple of the remainders (moduli) of division operations of two tuples. Syntax sql tupleModulo(tuple_num, tuple_mod) Arguments tuple_num β€” Tuple of numerator values. Tuple((U)Int*) or Tuple(Float*) or Tuple(D...
{"source_file": "tuple-functions.md"}
[ -0.041429851204156876, -0.03032379224896431, -0.042059291154146194, 0.030516501516103745, -0.0032813320867717266, -0.061331260949373245, 0.08708766102790833, 0.0018623999785631895, -0.03774357587099075, -0.032752875238657, 0.024976620450615883, -0.07031320780515671, 0.040725041180849075, -...
4d3a8a5f-0945-453e-8889-27480071d528
Syntax ```sql ``` Arguments None. Returned value Examples typical sql title=Query SELECT tupleNames(tuple(1 as a, 2 as b)) response title=Response ['a','b'] tupleNegate {#tupleNegate} Introduced in: v21.11 Calculates the negation of the tuple elements. Syntax sql tupleNegate(t) Argumen...
{"source_file": "tuple-functions.md"}
[ -0.031533438712358475, -0.03264982998371124, -0.03458648920059204, 0.022832898423075676, -0.05901831015944481, -0.0680672824382782, 0.05445447564125061, -0.03552772477269173, -0.026154272258281708, -0.04572204500436783, -0.03153533115983009, -0.032968536019325256, 0.050038035959005356, -0....
3602d52d-422e-4c2e-953f-3dde1abf552a
Example of using a Tuple -type column as the untuple function parameter: Query: sql SELECT untuple(v6) FROM kv; Result: text β”Œβ”€_ut_1─┬─_ut_2─┐ β”‚ 33 β”‚ ab β”‚ β”‚ 44 β”‚ cd β”‚ β”‚ 55 β”‚ ef β”‚ β”‚ 66 β”‚ gh β”‚ β”‚ 77 β”‚ kl β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”˜ Example of using an EXCEPT expression: Query: sql ...
{"source_file": "tuple-functions.md"}
[ -0.00992626417428255, -0.006802667398005724, -0.010602100752294064, -0.052076540887355804, 0.014470969326794147, 0.048883892595767975, -0.006687491666525602, -0.07358214259147644, -0.06231527775526047, -0.020760584622621536, 0.058872636407613754, -0.022888246923685074, -0.02289779670536518, ...
ca19af12-2f25-4e58-a389-22ac555c6c0b
description: 'Documentation for string replacement functions' sidebar_label: 'String replacement' slug: /sql-reference/functions/string-replace-functions title: 'Functions for string replacement' doc_type: 'reference' keywords: ['string replacement'] Functions for string replacement General strings functions and...
{"source_file": "string-replace-functions.md"}
[ -0.03304766118526459, 0.05322070047259331, 0.0072155604138970375, -0.010338595137000084, -0.06254090368747711, 0.010752526111900806, 0.03281255066394806, 0.08675938844680786, -0.06083056330680847, 0.011741750873625278, -0.028734052553772926, 0.034152135252952576, 0.07580270618200302, -0.07...
ec9b6753-9bbd-401a-b960-dd8f17142fc4
response title=Response β”Œβ”€res───────────────────┐ β”‚ My dad is from Mexico.β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ overlayUTF8 {#overlayUTF8} Introduced in: v24.9 Replace part of the string s with another string replace , starting at the 1-based index offset . Assumes that the string contains valid UTF-8 encoded text. If ...
{"source_file": "string-replace-functions.md"}
[ 0.016033293679356575, 0.06490424275398254, 0.06928207725286484, 0.003970044199377298, -0.07076422870159149, 0.033763233572244644, 0.060115996748209, 0.04468444362282753, 0.00033204525243490934, -0.06835038959980011, 0.038831863552331924, -0.025936085730791092, 0.0778227373957634, -0.108267...
f3b7252d-e720-4a1c-a427-9041b30d7b36
Returns a string with regex special characters escaped. String Examples Escape regex special characters sql title=Query SELECT regexpQuoteMeta('Hello. [World]? (Yes)*') AS res response title=Response β”Œβ”€res───────────────────────────┐ β”‚ Hello\. \[World\]\? \(Yes\)\* β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ replace...
{"source_file": "string-replace-functions.md"}
[ -0.05166151002049446, -0.002322993939742446, 0.12188930809497833, 0.04399356618523598, -0.04696042090654373, -0.04712539538741112, 0.02665838785469532, 0.002384783700108528, 0.006672459188848734, -0.007944220677018166, -0.043937794864177704, -0.011279047466814518, 0.024372553452849388, -0....
381a5d23-e7ba-4490-a46b-5cbdaaac3d02
response title=Response β”Œβ”€res─────────────────┐ β”‚ here: Hello, World! β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ replaceRegexpOne {#replaceRegexpOne} Introduced in: v1.1 Replaces the first occurrence of the substring matching the regular expression pattern (in re2 syntax) in haystack by the replacement string. replacement ...
{"source_file": "string-replace-functions.md"}
[ 0.025955256074666977, 0.011401208117604256, 0.09523428976535797, 0.05410150811076164, -0.05377728119492531, 0.05110261216759682, 0.05492815375328064, 0.025466352701187134, -0.05508977547287941, -0.013719907030463219, -0.027110431343317032, -0.08327187597751617, -0.01214818935841322, -0.076...
eb707a98-9af0-4acd-b1cc-cff3d7edf02d
from β€” A constant ASCII string containing characters to replace. const String to β€” A constant ASCII string containing replacement characters. const String Returned value Returns a string with character translations applied. String Examples Character mapping sql title=Query SELECT translate('Hello, Wo...
{"source_file": "string-replace-functions.md"}
[ -0.015526950359344482, -0.040182970464229584, 0.06192135065793991, 0.04402328282594681, -0.06326384842395782, -0.015567125752568245, 0.08604247123003006, 0.01959298551082611, 0.007408246863633394, -0.03541739657521248, -0.024967854842543602, -0.06232601776719093, 0.013615141622722149, -0.0...
328872b2-fcdd-4be6-bb8b-6001d7fba673
description: 'Documentation for UDFs User Defined Functions' sidebar_label: 'UDF' slug: /sql-reference/functions/udf title: 'UDFs User Defined Functions' doc_type: 'reference' import PrivatePreviewBadge from '@theme/badges/PrivatePreviewBadge'; UDFs User Defined Functions Executable User Defined Functions {#exe...
{"source_file": "udf.md"}
[ -0.0008076446247287095, -0.09784488379955292, -0.07014919817447662, -0.0029235119000077248, 0.0022599915973842144, -0.030519776046276093, -0.006148925982415676, 0.03257543221116066, -0.055411554872989655, 0.01782522164285183, 0.03847922757267952, -0.011345199309289455, -0.0009583525825291872...
9436e210-50e8-4fa2-bd8b-7ed5236defab
| Parameter | Description ...
{"source_file": "udf.md"}
[ 0.02740832231938839, 0.06670575588941574, -0.03908486291766167, -0.00019217900990042835, -0.07271697372198105, 0.030385518446564674, 0.01923644170165062, 0.04008970782160759, -0.007428995333611965, -0.041814737021923065, 0.032796137034893036, -0.1134740486741066, 0.028254574164748192, -0.0...
68e17adb-1604-472c-9429-e2624cd0b12b
| return_type | The type of a returned value ...
{"source_file": "udf.md"}
[ 0.004372890572994947, -0.0071741556748747826, -0.08697465062141418, 0.03630705922842026, -0.04728405922651291, -0.04048563167452812, -0.009954729117453098, 0.08394249528646469, 0.022551268339157104, -0.029623936861753464, 0.030967742204666138, -0.06318208575248718, -0.0435970313847065, -0....
d3fce72b-251b-4f2d-8fb5-aa66ee36ded7
10000 | | command_write_timeout | Timeout for writing data to command stdin in milliseconds ...
{"source_file": "udf.md"}
[ -0.007886712439358234, 0.01490434817969799, -0.09751792997121811, 0.06513446569442749, -0.0428081639111042, -0.058641448616981506, -0.00902734138071537, 0.08495380729436874, -0.013082856312394142, 0.022118741646409035, 0.012598896399140358, -0.013489785604178905, 0.021158263087272644, -0.1...
8b5baace-43aa-4443-a7ad-d09e57c3c851
The command must read arguments from STDIN and must output the result to STDOUT . The command must process arguments iteratively. That is after processing a chunk of arguments it must wait for the next chunk. Examples {#examples} Inline script Creating test_function_sum manually specifying execute_direct t...
{"source_file": "udf.md"}
[ 0.06691712141036987, 0.003617330454289913, -0.06746594607830048, 0.03559867665171623, -0.08131618052721024, -0.030960267409682274, 0.0647035464644432, 0.06059971824288368, -0.04764388129115105, 0.029672222211956978, 0.07788511365652084, -0.0902293473482132, -0.015184305608272552, -0.078681...
d4ac8f39-d0a1-4df1-ad18-f1c93d8102cf
xml <functions> <function> <type>executable</type> <name>test_function_sum_json</name> <return_type>UInt64</return_type> <return_name>result_name</return_name> <argument> <type>UInt64</type> <name>argument_1</name> </argument> <argument...
{"source_file": "udf.md"}
[ -0.046014733612537384, 0.019753841683268547, -0.07800887525081635, -0.003588352119550109, -0.08662857115268707, -0.04821227490901947, -0.01464878674596548, 0.08526430279016495, -0.04870572313666344, -0.050126492977142334, 0.05905485153198242, -0.024668769910931587, -0.038443006575107574, 0...
ba38ec2e-a321-4efb-9d12-34616dabe328
Executable user defined functions can be used with shell script. File test_function_shell.xml ( /etc/clickhouse-server/test_function_shell.xml with default path settings). xml <functions> <function> <type>executable</type> <name>test_shell</name> <return_type>String</return_type> ...
{"source_file": "udf.md"}
[ 0.07179336249828339, 0.0018999731400981545, -0.12564335763454437, -0.022050825878977776, -0.11020740866661072, -0.054661281406879425, 0.08207263052463531, 0.15112219750881195, -0.0792030468583107, 0.04162035882472992, 0.06558801978826523, -0.030101414769887924, 0.008751214481890202, -0.049...
81254b7c-196d-448d-9951-94bd16dbe23a
if a distributed_table has only one shard, all the 'f', 'g', and 'h' functions are performed on this shard's server. The result of a function usually does not depend on which server it is performed on. However, sometimes this is important. For example, functions that work with dictionaries use the dictionary that...
{"source_file": "udf.md"}
[ 0.031069960445165634, -0.051867686212062836, -0.015755148604512215, 0.01872551068663597, -0.0719878077507019, -0.059637147933244705, 0.006787018850445747, -0.10595450550317764, 0.057754985988140106, 0.02209080569446087, 0.04792495444417, 0.012892600148916245, 0.06966273486614227, -0.075771...
fddbb9c6-88c6-4528-a592-2e4042b05a79
description: 'Documentation for Comparison Functions' sidebar_label: 'Comparison' slug: /sql-reference/functions/comparison-functions title: 'Comparison Functions' doc_type: 'reference' Comparison functions Comparison rules {#comparison-rules} The comparison functions below return 0 or 1 with type UInt8 . ...
{"source_file": "comparison-functions.md"}
[ -0.029844101518392563, -0.001504734274931252, -0.016000032424926758, -0.02458530105650425, -0.06440095603466034, -0.05003688111901283, -0.020900284871459007, 0.016797734424471855, -0.0490262396633625, -0.05547996982932091, -0.01623099111020565, -0.03279319405555725, 0.02114678919315338, -0...
f73935f2-e704-4f83-ac93-27ccc90d4f70
Introduced in: v1.1 Compares two values for less-than relation. Syntax sql less(a, b) -- a < b Arguments a β€” First value. * - b β€” Second value. * Returned value Returns 1 if a is less than b , otherwise 0 UInt8 Examples Usage example sql title=Query SELECT 1 < 2, 2 < 1; respo...
{"source_file": "comparison-functions.md"}
[ -0.021498726680874825, 0.028231700882315636, 0.001919397385790944, -0.01791342720389366, -0.09456409513950348, -0.03288248926401138, -0.05152500420808792, 0.0436418391764164, 0.006086303852498531, -0.01783468760550022, -0.016957614570856094, -0.027311477810144424, 0.12274394184350967, -0.0...
e94f2229-2c06-42c7-9a22-b653389616fe
description: 'Documentation for the "other" functions category' sidebar_label: 'Other' slug: /sql-reference/functions/other-functions title: 'Other functions' doc_type: 'reference' import ExperimentalBadge from '@theme/badges/ExperimentalBadge'; import CloudNotSupportedBadge from '@theme/badges/CloudNotSupportedBad...
{"source_file": "other-functions.md"}
[ -0.046220723539590836, -0.021264906972646713, -0.012918384745717049, -0.0054944949224591255, -0.04672908037900925, -0.02432420291006565, 0.036569319665431976, -0.026442069560289383, 0.019016364589333534, -0.01074761152267456, 0.009440380148589611, -0.03078054077923298, 0.05701175332069397, ...
56789333-05a7-4265-b110-1c6c778b9d0a
key β€” Value of any type that is checked to be present in the filter Returned value True if the key was found in the filter Bool Examples Example sql title=Query This function is not supposed to be used in user queries. It might be added to query plan during optimization. ```response title=Response ``...
{"source_file": "other-functions.md"}
[ -0.06268076598644257, 0.056269217282533646, -0.015619475394487381, 0.015053466893732548, -0.06466474384069443, -0.03738783672451973, 0.16689816117286682, -0.00809202715754509, -0.0432821661233902, 0.007079035975039005, 0.004738028161227703, -0.0818510577082634, 0.018433988094329834, -0.062...
c6f7096c-cc6b-48b6-a116-469c65b92aca
Examples Usage example sql title=Query SELECT toHour(EventTime) AS h, count() AS c, bar(c, 0, 600000, 20) AS bar FROM test.hits GROUP BY h ORDER BY h ASC response title=Response β”Œβ”€β”€h─┬──────c─┬─bar────────────────┐ β”‚ 0 β”‚ 292907 β”‚ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‹ β”‚ β”‚ 1 β”‚ 180563 β”‚ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β”‚ β”‚ 2 β”‚ 114861 β”‚ β–ˆβ–ˆβ–ˆβ–‹ ...
{"source_file": "other-functions.md"}
[ 0.0019068153342232108, -0.05073399841785431, -0.004524406976997852, 0.12088035047054291, -0.07392144203186035, 0.008408370427787304, 0.03217827156186104, 0.0051246038638055325, 0.018338117748498917, 0.03419085219502449, 0.012855453416705132, -0.05955541878938675, 0.05486864596605301, -0.10...
b07d2583-265f-427c-ac4a-721dd593d513
Syntax sql blockSize() Arguments None. Returned value Returns the number of rows in the current block. UInt64 Examples Usage example sql title=Query SELECT blockSize() FROM system.numbers LIMIT 5 response title=Response β”Œβ”€blockSize()─┐ β”‚ 5 β”‚ β”‚ 5 β”‚ β”‚ 5 β”‚ β”‚ 5...
{"source_file": "other-functions.md"}
[ -0.003733888966962695, 0.0033012484200298786, -0.08554492890834808, 0.03388837352395058, -0.05311008542776108, -0.06643491238355637, 0.08292634040117264, 0.03484788537025452, -0.05069589987397194, -0.0077086929231882095, -0.06271090358495712, 0.016278868541121483, 0.015111560933291912, -0....
b18d606c-2546-4874-83bd-9365c55d7302
feature β€” One or more model features/arguments. Float* Returned value Returns the model evaluation result. Float64 Examples catboostEvaluate sql title=Query SELECT catboostEvaluate('/root/occupy.bin', Temperature, Humidity, Light, CO2, HumidityRatio) AS prediction FROM occupancy LIMIT 1 response title=...
{"source_file": "other-functions.md"}
[ 0.031642090529203415, 0.04724857583642006, -0.015829218551516533, 0.07474742084741592, 0.048990823328495026, -0.005231090355664492, 0.025092139840126038, 0.049804363399744034, -0.018279679119586945, -0.037847016006708145, 0.019925853237509727, -0.16684405505657196, 0.08516453206539154, -0....
a2cc011f-3133-494f-ae39-cee3f39567ef
The conversion consists of three stages: 1) sRGB to Linear sRGB 2) Linear sRGB to OKLab 3) OKLab to OKLCH. For references of colors in the OKLCH space, and how they correspond to sRGB colors, please see https://OKLCH.com/ . Syntax sql colorSRGBToOKLCH(tuple[, gamma]) Arguments tuple β€” Tuple of three value...
{"source_file": "other-functions.md"}
[ 0.03198384493589401, -0.06654395908117294, -0.02571992762386799, 0.0030516483820974827, 0.027435045689344406, -0.015573501586914062, 0.10980980098247528, 0.013387910090386868, -0.010638536885380745, -0.02182823047041893, -0.025127781555056572, -0.06036746874451637, 0.113146111369133, -0.06...
579139d3-67c7-47b1-8f6b-e7bccbe384e0
response title=Response β”Œβ”€countDigits(toDecimal32(1, 9))─┬─countDigits(toDecimal32(-1, 9))─┬─countDigits(toDecimal64(1, 18))─┬─countDigits(toDecimal64(-1, 18))─┬─countDigits(toDecimal128(1, 38))─┬─countDigits(toDecimal128(-1, 38))─┐ β”‚ 10 β”‚ 10 β”‚ ...
{"source_file": "other-functions.md"}
[ 0.0036889021284878254, -0.08160091191530228, -0.03458014130592346, 0.05464298650622368, -0.08984006196260452, -0.0046484703198075294, 0.0944988802075386, 0.07549183815717697, -0.07524454593658447, -0.014523091726005077, -0.02257586643099785, -0.11753113567829132, 0.08173221349716187, -0.07...
3785781c-44b8-48dc-985f-f3866d445caf
Function currentSchemas only exists for compatibility with PostgreSQL. Please use currentDatabase instead. Also see the SET statement . Syntax sql currentSchemas(bool) Aliases : current_schemas Arguments bool β€” A boolean value, which is ignored. Bool Returned value Returns a single-element ...
{"source_file": "other-functions.md"}
[ 0.026830535382032394, 0.003742747474461794, -0.028219662606716156, 0.021934736520051956, -0.08565591275691986, -0.046950146555900574, 0.15615375339984894, 0.021926086395978928, -0.023768411949276924, 0.011426610872149467, -0.05000863969326019, -0.04372195154428482, -0.028790857642889023, -...
3ecfca1d-fbef-4a4d-97dd-d4f3b7914513
Nullable example sql title=Query SELECT defaultValueOfArgumentType(CAST(1 AS Nullable(Int8))); response title=Response β”Œβ”€defaultValueOfArgumentType(CAST(1, 'Nullable(Int8)'))─┐ β”‚ ᴺᡁᴸᴸ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ defaultValueOfTypeNam...
{"source_file": "other-functions.md"}
[ -0.012767400592565536, -0.014639840461313725, -0.052918437868356705, 0.0445159412920475, -0.09923303127288818, -0.00023653141397517174, 0.08998048305511475, 0.0839243158698082, -0.05066072195768356, -0.08976906538009644, -0.009878790937364101, -0.048302434384822845, -0.003012831322848797, ...
62e6e5a6-0da6-4c31-aee0-33915aeff0b9
enabledRoles {#enabledRoles} Introduced in: v21.9 Returns an array of the roles which are enabled for the current user. Syntax sql enabledRoles() Arguments None. Returned value Returns an array of role names which are enabled for the current user. Array(String) Examples Usage example sql titl...
{"source_file": "other-functions.md"}
[ 0.0050421180203557014, -0.037919607013463974, -0.01867084577679634, 0.06965891271829605, -0.07076183706521988, -0.013818583451211452, 0.08373311907052994, 0.0534735731780529, -0.14180736243724823, -0.07453007251024246, 0.028031667694449425, 0.030511867254972458, 0.07649502158164978, -0.025...
f29607e6-0362-4f24-b6ce-25f824c55508
Introduced in: v20.1 Returns the capacity of the filesystem in bytes. Needs the path to the data directory to be configured. Syntax sql filesystemCapacity([disk_name]) Arguments disk_name β€” Optional. The disk name to get the capacity for. If omitted, uses the default disk. String or FixedString Re...
{"source_file": "other-functions.md"}
[ -0.019967006519436836, -0.030332930386066437, -0.09265045076608658, 0.1253328174352646, 0.031825922429561615, -0.023078477010130882, 0.05526620149612427, 0.11547640711069107, 0.011876774951815605, 0.04794822260737419, 0.018235739320516586, 0.033976390957832336, 0.08901840448379517, -0.0504...
eba2fd6d-b6f4-4e91-8613-3e913eb36ed1
Returned value The formatted query String Examples multiline sql title=Query SELECT formatQuery('select a, b FRom tab WHERE a > 3 and b < 3'); response title=Response SELECT a, b FROM tab WHERE (a > 3) AND (b < 3) formatQueryOrNull {#formatQueryOrNull} Introduced in: v Returns a formatted, ...
{"source_file": "other-functions.md"}
[ 0.0018495031399652362, -0.0029012630693614483, -0.01949838548898697, -0.03834626078605652, -0.14179225265979767, 0.03385476768016815, 0.008161218836903572, 0.003344824770465493, -0.0066230325028300285, 0.015814337879419327, -0.04975482076406479, -0.045598242431879044, 0.05221741273999214, ...
08c29bd7-71d2-4ff0-96e3-ba2ac462a1f6
formatReadableQuantity {#formatReadableQuantity} Introduced in: v20.10 Given a number, this function returns a rounded number with suffix (thousand, million, billion, etc.) as a string. This function accepts any numeric type as input, but internally it casts them to Float64 . Results might be suboptimal with lar...
{"source_file": "other-functions.md"}
[ 0.01947125419974327, 0.024428920820355415, -0.07492413371801376, 0.03342749550938606, -0.11718031018972397, -0.054073452949523926, 0.0018010055646300316, 0.06464012712240219, -0.041802745312452316, 0.011415805667638779, -0.03759888932108879, -0.041790928691625595, -0.005467667244374752, -0...
a641e5b0-eda9-4a87-b610-281c81a3dd59
minimum_unit β€” Optional. Minimum unit to show. All smaller units are truncated. Acceptable values: nanoseconds , microseconds , milliseconds , seconds , minutes , hours , days , months , years . If explicitly specified value is bigger than maximum_unit , an exception will be thrown. Default value: seconds ...
{"source_file": "other-functions.md"}
[ 0.02629680372774601, 0.04045272246003151, -0.012701748870313168, 0.017159227281808853, -0.07703161984682083, -0.027547594159841537, 0.007657153531908989, 0.02339625544846058, -0.02781345136463642, -0.03734815865755081, -0.026508169248700142, -0.07373753190040588, -0.06626980751752853, -0.0...
a9ccb239-2be6-4c7c-abee-50c415715e17
sql title=Query SELECT generateRandomStructure(1) response title=Response c1 Map(UInt256, UInt16) with specified seed sql title=Query SELECT generateRandomStructure(NULL, 33) response title=Response c1 DateTime, c2 Enum8('c2V0' = 0, 'c2V1' = 1, 'c2V2' = 2, 'c2V3' = 3), c3 LowCardinality(Nullable(FixedString(30)...
{"source_file": "other-functions.md"}
[ -0.05019240826368332, 0.061830345541238785, -0.03440600633621216, 0.0075532724149525166, -0.07535961270332336, 0.0261941347271204, 0.010140406899154186, 0.011463582515716553, -0.028176292777061462, 0.025553463026881218, 0.03907514736056328, -0.15109248459339142, 0.001424945192411542, -0.09...
adc16173-adf5-4961-86e7-1ecd784e10f6
:::note Setting allow_get_client_http_header is required The function requires the setting allow_get_client_http_header to be enabled. The setting is not enabled by default for security reasons, because some headers, such as Cookie , could contain sensitive info. ::: HTTP headers are case sensitive for this func...
{"source_file": "other-functions.md"}
[ -0.03492220491170883, 0.06625164300203323, -0.01801961287856102, 0.0339820496737957, -0.012772205285727978, -0.04956834763288498, 0.029046671465039253, 0.020731471478939056, 0.00735040009021759, -0.008988688699901104, 0.005862764082849026, -0.07795125991106033, 0.06784965842962265, -0.0590...
3470214b-29b1-45c8-a2fd-70e382d81dd8
getOSKernelVersion {#getOSKernelVersion} Introduced in: v21.11 Returns a string with the OS kernel version. Syntax sql getOSKernelVersion() Arguments None. Returned value Returns the current OS kernel version. String Examples Usage example sql title=Query SELECT getOSKernelVersion(); respon...
{"source_file": "other-functions.md"}
[ 0.014506089501082897, 0.008089935407042503, -0.05466531589627266, -0.028002535924315453, -0.012168544344604015, -0.04491180181503296, 0.011364037171006203, 0.03498684614896774, -0.053914282470941544, -0.04609603062272072, -0.00020745658548548818, -0.003718008054420352, -0.02938912808895111, ...
841fef34-aa00-4421-8c84-e79ac1b3ccae
response title=Response my_value 100 NULL getSizeOfEnumType {#getSizeOfEnumType} Introduced in: v1.1 Returns the number of fields in the given Enum . Syntax sql getSizeOfEnumType(x) Arguments x β€” Value of type Enum . Enum Returned value Returns the number of fields with Enum input values. U...
{"source_file": "other-functions.md"}
[ 0.035991016775369644, -0.005554076284170151, -0.06263509392738342, 0.039627447724342346, -0.04843716323375702, 0.001737968297675252, 0.06029673293232918, 0.05619550123810768, -0.09375129640102386, -0.007316248957067728, -0.0048202695325016975, -0.09594354778528214, 0.030869023874402046, -0...
cd9470ed-7360-4dc0-aa2e-e193fcd638b0
Arguments database β€” Name of the database. const String table β€” Name of the table. const String column β€” Name of the column. const String hostname β€” Optional. Remote server name to perform the check on. const String username β€” Optional. Username for remote server. const String password β€” Option...
{"source_file": "other-functions.md"}
[ 0.021588170900940895, -0.012177354656159878, -0.08256233483552933, 0.0705428421497345, -0.05138804763555527, -0.033544883131980896, 0.05269200727343559, 0.03753179311752319, -0.0022005813661962748, 0.05670559033751488, -0.01878475956618786, -0.07084435969591141, 0.01149645633995533, -0.078...
90042ade-fd47-452e-b34e-1b466339111f
icebergTruncate {#icebergTruncate} Introduced in: v25.3 Implements logic of iceberg truncate transform: https://iceberg.apache.org/spec/#truncate-transform-details. Syntax sql icebergTruncate(N, value) Arguments value β€” The value to transform. String or (U)Int* or Decimal Returned value The sa...
{"source_file": "other-functions.md"}
[ -0.07976435124874115, 0.02771863155066967, -0.05361754074692726, 0.09403012692928314, -0.0007212163764052093, -0.06278873234987259, 0.03882912918925285, 0.04910089448094368, -0.01924346759915352, -0.04207950457930565, -0.0022347138728946447, 0.05589626356959343, -0.010387592948973179, -0.0...
cb0f87fd-158a-43ea-9f0a-1d3eeff06be4
Syntax sql initialQueryID() Aliases : initial_query_id Arguments None. Returned value Returns the ID of the initial current query. String Examples Usage example sql title=Query CREATE TABLE tmp (str String) ENGINE = Log; INSERT INTO tmp (*) VALUES ('a'); SELECT count(DISTINCT t) FROM (SELECT ini...
{"source_file": "other-functions.md"}
[ -0.021832015365362167, -0.01923026517033577, -0.028679130598902702, 0.0933210626244545, -0.09529438614845276, -0.0252340417355299, 0.031102381646633148, 0.025249315425753593, 0.09345003217458725, -0.024745365604758263, 0.033292870968580246, -0.017127981409430504, 0.051133789122104645, -0.0...
789e785f-19fe-48bf-8794-7251bd47c27b
sql title=Query SELECT finalizeAggregation(state), toTypeName(state) FROM (SELECT initializeAggregation('sumState', number % 3) AS state FROM numbers(5)); response title=Response β”Œβ”€finalizeAggregation(state)─┬─toTypeName(state)─────────────┐ β”‚ 0 β”‚ AggregateFunction(sum, UInt8) β”‚ β”‚ ...
{"source_file": "other-functions.md"}
[ -0.0711829736828804, -0.023594340309500694, 0.025116844102740288, 0.08564156293869019, -0.05912493169307709, 0.014227843843400478, 0.08884958922863007, 0.021505774930119514, -0.021170319989323616, -0.010499793104827404, -0.046765245497226715, -0.08845183998346329, 0.0209727194160223, -0.06...
9ab0dc29-5021-4d3a-a2b9-3c3d0a8d40bb
response title=Response β”Œβ”€isDecimalOverflow(toDecimal32(1000000000, 0), 9)─┬─isDecimalOverflow(toDecimal32(1000000000, 0))─┬─isDecimalOverflow(toDecimal32(-1000000000, 0), 9)─┬─isDecimalOverflow(toDecimal32(-1000000000, 0))─┐ β”‚ 1 β”‚ ...
{"source_file": "other-functions.md"}
[ -0.0029281191527843475, 0.05878686532378197, -0.08018134534358978, 0.07898121327161789, -0.04365461319684982, -0.06615616381168365, 0.03952384740114212, 0.09656618535518646, -0.05321192368865013, 0.002634357428178191, 0.05526310205459595, -0.05466744303703308, 0.1013464480638504, -0.062905...
765c9c5d-f26e-4310-ac9b-30514b71d415
Allows you to extract data from a table the same way as from a dictionary. Gets data from Join tables using the specified join key. Unlike joinGet it returns NULL when the key is missing. :::note Only supports tables created with the ENGINE = Join(ANY, LEFT, <join_keys>) statement . ::: Syntax sql joinGetO...
{"source_file": "other-functions.md"}
[ -0.014205853454768658, 0.0381561703979969, -0.10138014703989029, 0.10257048904895782, -0.05640358105301857, -0.03897852823138237, 0.07277756929397583, 0.09890223294496536, -0.09660236537456512, -0.003472878597676754, 0.048072732985019684, 0.007109359838068485, 0.10382039844989777, -0.08905...
1e943aac-5236-4fcb-87b6-045be64d8bc4
INSERT INTO test VALUES ('ab'), ('cd'), ('ab'), ('ab'), ('df'); INSERT INTO test VALUES ('ef'), ('cd'), ('ab'), ('cd'), ('ef'); SELECT s, lowCardinalityIndices(s) FROM test; ``` response title=Response β”Œβ”€s──┬─lowCardinalityIndices(s)─┐ β”‚ ab β”‚ 1 β”‚ β”‚ cd β”‚ 2 β”‚ β”‚ ab β”‚ ...
{"source_file": "other-functions.md"}
[ 0.05166691914200783, 0.0288395918905735, -0.02893870882689953, 0.0003904630139004439, -0.07101603597402573, -0.08070604503154755, 0.04793672263622284, 0.02031616121530533, -0.00815058033913374, 0.021016642451286316, 0.11363483220338821, -0.06602926552295685, 0.03415462002158165, -0.0124442...
73bba5fa-40b8-43e8-a411-553e07c8f016
SELECT countMatches('foobarfoo', 'foo'); SELECT countMatches('foobarfoo', materialize('foo')); ``` response title=Response 2 Code: 44. DB::Exception: Received from localhost:9000. DB::Exception: Illegal type of argument #2 'pattern' of function countMatches, expected constant String, got String minSampleSizeContinu...
{"source_file": "other-functions.md"}
[ 0.05340809002518654, -0.011254839599132538, 0.005241414997726679, 0.06129120662808418, -0.11447650194168091, 0.015630632638931274, -0.008008860051631927, 0.12463837116956711, -0.02937854826450348, -0.028589775785803795, -0.008801458403468132, -0.13581885397434235, 0.051307275891304016, -0....
2ebf62e0-de62-40ab-b2cd-2715197bd27b
power β€” Required statistical power of a test (1 - probability of Type II error). Float* alpha β€” Required significance level of a test (probability of Type I error). Float* Returned value Returns a named Tuple with 3 elements: minimum_sample_size , detect_range_lower , detect_range_upper . These are, resp...
{"source_file": "other-functions.md"}
[ 0.049230027943849564, 0.042397987097501755, -0.05140641704201698, 0.04262088984251022, 0.04879752919077873, -0.06100461632013321, -0.027952291071414948, 0.053933754563331604, -0.03797640651464462, 0.025257796049118042, -0.02679067850112915, -0.051340725272893906, 0.05068853124976158, -0.04...
c5888e40-b74c-4b69-80e3-1caf4124f569
nested {#nested} Introduced in: v This is a function used internally by the ClickHouse engine and not meant to be used directly. Returns the array of tuples from multiple arrays. The first argument must be a constant array of Strings determining the names of the resulting Tuple. The other arguments must be arra...
{"source_file": "other-functions.md"}
[ -0.003234041156247258, -0.008396467193961143, 0.008680774830281734, 0.05961279943585396, -0.12175378203392029, -0.06779848039150238, 0.07499866187572479, 0.017172563821077347, -0.08239810913801193, -0.02071135863661766, 0.00025750542408786714, 0.020466553047299385, 0.08662097901105881, -0....
93ae8cd9-c528-43fb-8bbe-9c9e88effdef
response title=Response β”Œβ”€res─┐ β”‚ 1 β”‚ β””β”€β”€β”€β”€β”€β”˜ normalizedQueryHashKeepNames {#normalizedQueryHashKeepNames} Introduced in: v21.2 Like normalizedQueryHash it returns identical 64 bit hash values without the values of literals for similar queries, but it does not replace complex aliases (containing whitespace, m...
{"source_file": "other-functions.md"}
[ 0.053161878138780594, 0.03340715914964676, 0.018857533112168312, -0.009152024984359741, -0.11067059636116028, -0.05871563404798508, 0.046201441437006, -0.048973169177770615, 0.023821605369448662, -0.012217958457767963, -0.02809084579348564, -0.025587288662791252, 0.059661105275154114, -0.0...
fa561f82-90d7-489d-8790-a3226bf77788
Returned value Returns the number of bytes, rounded up to the nearest integer, or NULL if unable to parse the input Nullable(UInt64) Examples Usage example sql title=Query SELECT arrayJoin(['1 B', '1 KiB', '3 MB', '5.314 KiB', 'invalid']) AS readable_sizes, parseReadableSizeOrNull(readable_sizes) AS sizes; ...
{"source_file": "other-functions.md"}
[ 0.010236036032438278, 0.02453939989209175, -0.07912776619195938, 0.05271587893366814, -0.10916189104318619, -0.012447595596313477, 0.0669863373041153, 0.04372544586658478, -0.0426427386701107, -0.013595235534012318, -0.04629340022802353, -0.04928375780582428, 0.0447552427649498, -0.0608319...
9176bff7-e8b9-4b84-bafd-a53142396ccd
sql title=Query SELECT parseTimeDelta('1yr2mo') response title=Response β”Œβ”€parseTimeDelta('1yr2mo')─┐ β”‚ 36806400 β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ partitionId {#partitionId} Introduced in: v21.4 Computes the partition ID . :::note This function is slow and should not be called for large numbers o...
{"source_file": "other-functions.md"}
[ -0.021148597821593285, 0.000231345315114595, 0.04701998829841614, -0.005784383974969387, -0.032282449305057526, -0.06291268765926361, 0.07686913758516312, 0.054525621235370636, -0.002020507585257292, -0.04970630258321762, 0.003409670665860176, -0.03149450942873955, -0.006763855926692486, -...
6069d191-aebd-40a7-82f8-82243361dfee
Examples Usage example sql title=Query SELECT rowNumberInAllBlocks() FROM ( SELECT * FROM system.numbers_mt LIMIT 10 ) SETTINGS max_block_size = 2 response title=Response β”Œβ”€rowNumberInAllBlocks()─┐ β”‚ 0 β”‚ β”‚ 1 β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”Œβ”€rowNumberInAllBlocks(...
{"source_file": "other-functions.md"}
[ -0.08028263598680496, -0.024341970682144165, -0.038813233375549316, -0.0107577508315444, -0.05763332173228264, -0.015038833022117615, 0.0119194770231843, 0.028116948902606964, -0.03266375511884689, -0.010164350271224976, -0.022563401609659195, 0.0068043069913983345, 0.003953215200453997, -...
b1c19436-129c-4c07-8bc0-6e3adc3ea4c6
response title=Response β”Œβ”€number─┬─one_row_sum─┬─cumulative_sum─┐ β”‚ 0 β”‚ 0 β”‚ 0 β”‚ β”‚ 1 β”‚ 1 β”‚ 1 β”‚ β”‚ 2 β”‚ 2 β”‚ 3 β”‚ β”‚ 3 β”‚ 3 β”‚ 6 β”‚ β”‚ 4 β”‚ 4 β”‚ 10 β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ...
{"source_file": "other-functions.md"}
[ -0.027601728215813637, -0.06886226683855057, -0.04060085490345955, 0.04051213711500168, -0.05431830883026123, 0.006695093121379614, -0.018764056265354156, -0.004698551259934902, 0.028341669589281082, 0.021928150206804276, 0.041354719549417496, -0.09136991947889328, -0.02383209578692913, -0...
f1c04a93-f12b-456b-822d-7e6d8fbfa56a
Syntax sql runningDifference(x) Arguments x β€” Column for which to calculate the running difference. Any Returned value Returns the difference between consecutive values, with 0 for the first row. Examples Usage example sql title=Query SELECT EventID, EventTime, runningDifference(EventT...
{"source_file": "other-functions.md"}
[ -0.01623208448290825, -0.00007350810483330861, 0.0035730840172618628, -0.01030436996370554, -0.02291635051369667, -0.04658134654164314, 0.03547393158078194, 0.0008797834161669016, 0.03902420401573181, 0.0008242317126132548, -0.019074609503149986, -0.046904340386390686, -0.07414205372333527, ...
7eafe64e-8ddd-4221-ac86-eaba07615122
Introduced in: v21.9 Returns the total number of shards for a distributed query. If a query is not distributed then constant value 0 is returned. Syntax sql shardCount() Arguments None. Returned value Returns the total number of shards or 0 . UInt32 Examples Usage example sql title=Query -- ...
{"source_file": "other-functions.md"}
[ 0.07398514449596405, -0.06357374042272568, -0.01685524359345436, 0.07232260704040527, -0.049440689384937286, -0.011903746984899044, -0.01899501495063305, -0.023001449182629585, 0.06856793165206909, -0.009615328162908554, 0.029753118753433228, -0.020820798352360725, 0.0553583949804306, -0.0...
41227203-1113-439d-ba79-7bd147fd9a69
Testing : When testing or benchmarking ClickHouse, you may want to simulate delays or introduce pauses to observe how the system behaves under certain conditions. Debugging : If you need to examine the state of the system or the execution of a query at a specific point in time, you can use sleep() to introduce a pa...
{"source_file": "other-functions.md"}
[ -0.04390041157603264, -0.0743931233882904, -0.09817603975534439, 0.06926333159208298, -0.035038743168115616, -0.06276629120111465, 0.03154131397604942, -0.036164090037345886, -0.028481248766183853, -0.0331881046295166, 0.008682552725076675, -0.01637507975101471, 0.0028539220802485943, -0.0...
1203cba5-3d67-4385-9c9d-7934e95d1231
Syntax sql sleepEachRow(seconds) Arguments seconds β€” The number of seconds to pause the query execution for each row in the result set to a maximum of 3 seconds. It can be a floating-point value to specify fractional seconds. const UInt* or const Float* Returned value Returns 0 for each row. UInt8 ...
{"source_file": "other-functions.md"}
[ -0.008616884239017963, -0.022453488782048225, -0.07565426826477051, 0.07196702063083649, -0.027250532060861588, -0.03068586066365242, 0.07592014968395233, -0.03545067086815834, 0.03869376704096794, -0.002793962834402919, 0.000414715294027701, -0.06608826667070389, -0.04986156150698662, -0....
8f1df287-4c2e-460a-a21d-9b32b2be7b07
throwIf {#throwIf} Introduced in: v1.1 Throw an exception if argument x is true. To use the error_code argument, configuration parameter allow_custom_error_code_in_throw must be enabled. Syntax sql throwIf(x[, message[, error_code]]) Arguments x β€” The condition to check. Any message β€” Optional. C...
{"source_file": "other-functions.md"}
[ 0.056988559663295746, 0.017696095630526543, -0.0438944511115551, 0.03779119998216629, -0.0035682108718901873, 0.038606662303209305, 0.05471086502075195, 0.09324057400226593, -0.028272032737731934, 0.019958755001425743, 0.046722933650016785, -0.07633545994758606, 0.06648501008749008, -0.032...
5282900d-abdf-4097-9d8f-eba49e7c8a31
For more information see the page Transactional (ACID) support . ::: Syntax sql transactionID() Arguments None. Returned value Returns a tuple consisting of start_csn , local_tid and host_id . - start_csn : Global sequential number, the newest commit timestamp that was seen when this transaction b...
{"source_file": "other-functions.md"}
[ -0.05709048733115196, -0.023723818361759186, -0.094562828540802, 0.027590081095695496, -0.03376691788434982, 0.025469722226262093, 0.06774485111236572, -0.02847016043961048, 0.07927986234426498, -0.030222967267036438, 0.06775632500648499, 0.03471486642956734, 0.0018577591981738806, -0.0898...
ecbf736a-d784-4b42-a967-e597fde0ed83
transform {#transform} Introduced in: v1.1 Transforms a value according to the explicitly defined mapping of some elements to other elements. There are two variations of this function: - transform(x, array_from, array_to, default) - transforms x using mapping arrays with a default value for unmatched elements...
{"source_file": "other-functions.md"}
[ 0.019958680495619774, 0.01627594232559204, -0.00826269295066595, -0.04910941794514656, 0.005055942106992006, -0.06812307983636856, 0.039984509348869324, -0.08926647156476974, -0.014312569983303547, -0.054130423814058304, 0.0035106800496578217, 0.0060724555514752865, 0.007072984240949154, -...
73fd3d06-839e-48d7-9cd5-fb519209a61e
response title=Response β”Œβ”€s──────────────┬───────c─┐ β”‚ β”‚ 2906259 β”‚ β”‚ www.yandex β”‚ 867767 β”‚ β”‚ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ.ru β”‚ 313599 β”‚ β”‚ mail.yandex.ru β”‚ 107147 β”‚ β”‚ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ.ru β”‚ 100355 β”‚ β”‚ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ.ru β”‚ 65040 β”‚ β”‚ news.yandex.ru β”‚ 64515 β”‚ β”‚ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ.net β”‚ 59141 β”‚ β”‚ example.com β”‚ 57316 β”‚ └─────...
{"source_file": "other-functions.md"}
[ 0.016171589493751526, -0.06339989602565765, 0.007817618548870087, 0.079646535217762, -0.023572219535708427, -0.026334771886467934, 0.15784819424152374, -0.042742062360048294, -0.01679311878979206, 0.0208742618560791, -0.0047363294288516045, -0.058561887592077255, 0.08013410121202469, -0.07...
81473682-e8ac-44fb-a0de-0f5f002eaa15
response title=Response β”Œβ”€a_union_b─┬─a_cardinality─┬─b_cardinality─┐ β”‚ 4 β”‚ 2 β”‚ 3 β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ uptime {#uptime} Introduced in: v1.1 Returns the server's uptime in seconds. If executed in the context of a distributed table, this function generates ...
{"source_file": "other-functions.md"}
[ -0.03478710725903511, 0.021840615198016167, -0.048809200525283813, 0.07326848804950714, -0.033821772783994675, -0.008180259726941586, 0.020038625225424767, 0.02150631882250309, 0.015795135870575905, 0.016530834138393402, 0.0038311397656798363, -0.05990653485059738, -0.0349750816822052, -0....
48d96c32-094c-471c-8850-3a57d7bba978
response title=Response β”Œβ”€variantType(v)─┐ β”‚ None β”‚ β”‚ UInt64 β”‚ β”‚ String β”‚ β”‚ Array(UInt64) β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ version {#version} Introduced in: v1.1 Returns the current version of ClickHouse as a string in the form: major_version.minor_version.patch_version.number_of_commits_since_the...
{"source_file": "other-functions.md"}
[ 0.03651052713394165, -0.004941627383232117, -0.03733937442302704, 0.05498012155294418, -0.029756104573607445, -0.04897685721516609, -0.004665188957005739, -0.013728780671954155, -0.03118627518415451, 0.028144966810941696, 0.06135944277048111, -0.013354463502764702, 0.021038005128502846, -0...
dc8caef7-2d2b-478c-846b-8fcd7e4aade7
description: 'Documentation for Json Functions' sidebar_label: 'JSON' slug: /sql-reference/functions/json-functions title: 'JSON Functions' doc_type: 'reference' Types of JSON functions {#types-of-functions} There are two sets of functions to parse JSON: - simpleJSON* ( visitParam* ) which is made for parsing ...
{"source_file": "json-functions.md"}
[ -0.06949818879365921, 0.022027993574738503, -0.019771326333284378, 0.001794022275134921, -0.07199224829673767, -0.048478368669748306, -0.030054472386837006, 0.020059529691934586, -0.04333706572651863, -0.09002312272787094, 0.05594927817583084, -0.015175734646618366, -0.029871702194213867, ...
31518d77-fa76-49d7-b780-c15a1667a8b3
JSONAllPathsWithTypes {#JSONAllPathsWithTypes} Introduced in: v24.8 Returns the list of all paths and their data types stored in each row in JSON column. Syntax sql JSONAllPathsWithTypes(json) Arguments json β€” JSON column. JSON Returned value Returns a map of all paths and their data types in the ...
{"source_file": "json-functions.md"}
[ 0.020696628838777542, -0.01759178936481476, 0.041409920901060104, 0.06085548922419548, -0.0803975760936737, -0.00593690387904644, -0.03679423779249191, 0.0163527000695467, -0.037877462804317474, -0.017712263390421867, 0.016058476641774178, 0.008679434657096863, -0.03311695531010628, 0.0602...
f0ec51ad-d202-4e90-8635-c42089949528
JSONDynamicPathsWithTypes {#JSONDynamicPathsWithTypes} Introduced in: v24.8 Returns the list of dynamic paths that are stored as separate subcolumns and their types in each row in JSON column. Syntax sql JSONDynamicPathsWithTypes(json) Arguments json β€” JSON column. JSON Returned value Returns a ma...
{"source_file": "json-functions.md"}
[ 0.01149396225810051, -0.01891183853149414, 0.04246492311358452, 0.06296315789222717, -0.09565231204032898, -0.0026270104572176933, -0.04977522790431976, 0.012149871326982975, -0.03861216455698013, -0.030887838453054428, 0.022973408922553062, -0.020572131499648094, -0.020518597215414047, 0....
2a51d924-87d4-479d-8ab8-5d6c13cc04bd
JSONExtractArrayRawCaseInsensitive {#JSONExtractArrayRawCaseInsensitive} Introduced in: v25.8 Returns an array with elements of JSON array, each represented as unparsed string, using case-insensitive key matching. This function is similar to JSONExtractArrayRaw . Syntax sql JSONExtractArrayRawCaseInsensitive(j...
{"source_file": "json-functions.md"}
[ 0.019895270466804504, 0.013644673861563206, 0.006030367687344551, 0.02573857456445694, -0.07193788141012192, -0.04318000748753548, 0.05603222921490669, -0.03577817231416702, -0.05127879977226257, -0.050145942717790604, -0.015404889360070229, -0.007942832075059414, 0.025586020201444626, 0.0...
cc2ed5a1-c3c1-400c-9923-7f5b91018df3
response title=Response 123 array_type sql title=Query SELECT JSONExtractCaseInsensitive('{"List": [1, 2, 3]}', 'list', 'Array(Int32)') response title=Response [1,2,3] JSONExtractFloat {#JSONExtractFloat} Introduced in: v20.1 Parses JSON and extracts a value of Float type. Syntax sql JSONExtractFloat(js...
{"source_file": "json-functions.md"}
[ -0.00156906817574054, 0.054262612015008926, -0.004288982134312391, 0.032675229012966156, -0.046205054968595505, -0.0453639030456543, 0.09649836272001266, 0.0280435923486948, -0.03847789019346237, -0.04828817769885063, -0.009510677307844162, -0.08606623858213425, -0.0017495248466730118, 0.0...
a84a136c-8667-4850-b032-c3a9b1a354a7
response title=Response 123 nested sql title=Query SELECT JSONExtractIntCaseInsensitive('{"DATA": {"COUNT": 42}}', 'data', 'Count') response title=Response 42 JSONExtractKeys {#JSONExtractKeys} Introduced in: v21.11 Parses a JSON string and extracts the keys. Syntax sql JSONExtractKeys(json[, indices_or...
{"source_file": "json-functions.md"}
[ 0.00007005590305197984, 0.03546833246946335, 0.029581943526864052, 0.024232909083366394, -0.11062260717153549, -0.021895699203014374, 0.05437019094824791, 0.02489471063017845, 0.005869484972208738, -0.06251818686723709, 0.022631177678704262, -0.0004008839896414429, 0.06406236439943314, -0....
91209145-1bff-408e-94d7-b2b11cafabb6
Arguments json β€” JSON string to parse. String indices_or_keys β€” A list of zero or more arguments each of which can be either string or integer. String or (U)Int* Returned value Returns an array of tuples with parsed key-value pairs where values are unparsed strings. Array(Tuple(String, String)) Exa...
{"source_file": "json-functions.md"}
[ -0.008119462989270687, 0.06007228046655655, 0.005510185845196247, 0.006716901436448097, -0.07790334522724152, -0.0308331660926342, 0.05004703626036644, 0.005876477342098951, -0.030153600499033928, -0.06615598499774933, 0.00835954025387764, -0.011738771572709084, 0.038239315152168274, -0.02...
3f8492a1-f11b-4c0a-b81d-9d3b16f9af8f
Examples Usage example sql title=Query SELECT JSONExtractRaw('{"a": "hello", "b": [-100, 200.0, 300]}', 'b') AS res; response title=Response β”Œβ”€res──────────────┐ β”‚ [-100,200.0,300] β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ JSONExtractRawCaseInsensitive {#JSONExtractRawCaseInsensitive} Introduced in: v25.8 Returns part of the ...
{"source_file": "json-functions.md"}
[ -0.01686728186905384, 0.05920249596238136, 0.030114002525806427, 0.0474851168692112, -0.0624091662466526, -0.038188934326171875, 0.0434306375682354, 0.03701462596654892, -0.032637231051921844, -0.04114706814289093, -0.021825013682246208, -0.04082394018769264, 0.037089210003614426, 0.031100...
5fdbb5d9-6ed3-45d9-a243-90fd8a886b45
Returns a UInt value if it exists, otherwise returns 0 . UInt64 Examples Usage example sql title=Query SELECT JSONExtractUInt('{"a": "hello", "b": [-100, 200.0, 300]}', 'b', -1) AS res; response title=Response β”Œβ”€res─┐ β”‚ 300 β”‚ β””β”€β”€β”€β”€β”€β”˜ JSONExtractUIntCaseInsensitive {#JSONExtractUIntCaseInsensitive} Introdu...
{"source_file": "json-functions.md"}
[ -0.022876281291246414, 0.03912338614463806, -0.0013780088629573584, 0.03619023412466049, -0.08243948221206665, -0.03133546933531761, 0.04008011147379875, 0.02603774145245552, -0.017265353351831436, -0.06935770809650421, 0.040015920996665955, -0.0727870762348175, 0.03525201231241226, 0.0048...
4deea189-b428-4f9c-b8fa-3b66e5818355
response title=Response β”Œβ”€res───────────────────┐ β”‚ {"a":1,"name":"zoey"} β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ JSONSharedDataPaths {#JSONSharedDataPaths} Introduced in: v24.8 Returns the list of paths that are stored in shared data structure in JSON column. Syntax sql JSONSharedDataPaths(json) Arguments json β€” ...
{"source_file": "json-functions.md"}
[ 0.0014574667438864708, -0.010046589188277721, 0.008241458795964718, 0.07563621550798416, -0.09175442904233932, -0.01468564197421074, -0.03210015594959259, 0.009201445616781712, -0.009203780442476273, -0.020689064636826515, 0.02260446362197399, -0.0008841096423566341, 0.01691964454948902, 0...
41504b27-f4b9-428b-919c-b9dbaaecec76
Returned value Returns the type of a JSON value as a string, otherwise if the value doesn't exist it returns Null=0 Enum Examples Usage example sql title=Query SELECT JSONType('{"a": "hello", "b": [-100, 200.0, 300]}') = 'Object'; SELECT JSONType('{"a": "hello", "b": [-100, 200.0, 300]}', 'a') = 'String'; SE...
{"source_file": "json-functions.md"}
[ -0.02358173578977585, -0.0030703935772180557, -0.005794175900518894, 0.013263637199997902, -0.07261928170919418, -0.04540321230888367, 0.019832322373986244, 0.022517366334795952, 0.010466599836945534, -0.0623907595872879, 0.05186204984784126, -0.04639586806297302, 0.0034543336369097233, 0....
5715baf1-2b96-4100-8817-ade5ef1ae2b8
Syntax sql JSON_VALUE(json, path) Arguments json β€” A string with valid JSON. String path β€” A string representing the path. String Returned value Returns the extracted JSON scalar as a string, or an empty string if the value does not exist. String Examples Usage example sql title=Query SELECT ...
{"source_file": "json-functions.md"}
[ 0.02102174237370491, 0.042351916432380676, 0.010788297280669212, 0.058091018348932266, -0.07590038329362869, -0.04034337028861046, 0.02702518180012703, 0.020525041967630386, 0.014147985726594925, -0.08202805370092392, 0.008642164058983326, -0.029643911868333817, -0.0442788228392601, 0.0041...
c9decf93-271c-455b-af21-87d0a15daecc
response title=Response β”Œβ”€d─────────────┬─dynamicType(d)─┬─dynamicElement(d, 'String')─┬─dynamicElement(d, 'Int64')─┬─dynamicElement(d, 'Array(Int64)')─┬─dynamicElement(d, 'Date')─┬─dynamicElement(d, 'Array(String)')─┐ β”‚ ᴺᡁᴸᴸ β”‚ None β”‚ ᴺᡁᴸᴸ β”‚ ᴺᡁᴸᴸ β”‚ [] ...
{"source_file": "json-functions.md"}
[ 0.03755713254213333, 0.008738632313907146, -0.016065793111920357, 0.09241428226232529, -0.08021054416894913, -0.0384586825966835, 0.0500776581466198, 0.025529300794005394, -0.06742867082357407, -0.016163822263479233, 0.005441389977931976, -0.02323155850172043, -0.02485743910074234, -0.0399...
101c9a9a-f409-4ed0-9e5b-9e39b57496e7
Returns true if the value is stored in shared variant format, false if stored as a separate subcolumn or is NULL. Bool Examples Checking storage format in Dynamic column with max_types limit sql title=Query CREATE TABLE test (d Dynamic(max_types=2)) ENGINE = Memory; INSERT INTO test VALUES (NULL), (42), ('Hello,...
{"source_file": "json-functions.md"}
[ -0.009254737757146358, 0.016527336090803146, -0.02383931167423725, 0.035886768251657486, -0.06420782953500748, -0.024179603904485703, 0.013912123627960682, 0.017611496150493622, -0.006405623164027929, -0.011427796445786953, -0.0038807657547295094, -0.04520934075117111, -0.01610003225505352, ...
eabe24ab-d6ac-4a8b-91ec-a850c381a2a2
response title=Response 0 1 0 0 simpleJSONExtractFloat {#simpleJSONExtractFloat} Introduced in: v21.4 Parses Float64 from the value of the field named field_name . If field_name is a string field, it tries to parse a number from the beginning of the string. If the field does not exist, or it exists but does ...
{"source_file": "json-functions.md"}
[ -0.04061532020568848, 0.05618120729923248, 0.01451276894658804, 0.023366082459688187, -0.053910039365291595, -0.03649713844060898, 0.024050865322351456, 0.1029166653752327, 0.02633272111415863, -0.09761984646320343, -0.016842694953083992, -0.03674330189824104, -0.017810285091400146, 0.0037...
0ce34e53-4988-4f6d-8a8d-73612e03813b
Examples Usage example ``sql title=Query CREATE TABLE jsons ( json` String ) ENGINE = MergeTree ORDER BY tuple(); INSERT INTO jsons VALUES ('{"foo":"-4e3"}'); INSERT INTO jsons VALUES ('{"foo":-3.4}'); INSERT INTO jsons VALUES ('{"foo":5}'); INSERT INTO jsons VALUES ('{"foo":{"def":[1,2,3]}}'); INSERT INTO jsons ...
{"source_file": "json-functions.md"}
[ -0.04467713460326195, 0.00022497924510389566, 0.03834700956940651, 0.03820106014609337, -0.0864584743976593, 0.009846089407801628, -0.01886303909122944, 0.03883064538240433, -0.0229096207767725, -0.018784839659929276, 0.021024568006396294, 0.02087176777422428, 0.023630453273653984, -0.0438...
7668ea84-5405-4111-a6ce-10fb68d43ca1
response title=Response 0 4 0 3 5 simpleJSONHas {#simpleJSONHas} Introduced in: v21.4 Checks whether there is a field named field_name . Syntax sql simpleJSONHas(json, field_name) Aliases : visitParamHas Arguments json β€” The JSON in which the field is searched for. String field_name β€” The name ...
{"source_file": "json-functions.md"}
[ -0.04253186658024788, 0.06031905859708786, 0.014422256499528885, 0.008590146899223328, -0.10034319758415222, -0.02354859933257103, -0.006791211199015379, 0.05235694348812103, 0.01297380868345499, -0.043433286249637604, 0.010096787475049496, 0.005623929668217897, -0.009389019571244717, -0.0...
2b575319-3d4a-485c-b803-3e22ec9b35ff
description: 'Documentation for functions used to work with URLs' sidebar_label: 'URLs' slug: /sql-reference/functions/url-functions title: 'Functions for working with URLs' doc_type: 'reference' Functions for working with URLs Overview {#overview} :::note The functions mentioned in this section are optimized f...
{"source_file": "url-functions.md"}
[ -0.03542696312069893, -0.025909239426255226, 0.02731914073228836, -0.03280477970838547, -0.037690021097660065, -0.028341373428702354, -0.018795419484376907, 0.018828146159648895, 0.03745308890938759, -0.02482648380100727, -0.03592609614133835, -0.03733624890446663, 0.055261414498090744, -0...
8aa28888-36b5-42c3-9fe7-de4b9bc57c1a
Returned value Returns the URL with query string removed. String Examples Usage example sql title=Query SELECT cutQueryString('http://example.com/path?query=value&param=123#fragment'); response title=Response β”Œβ”€cutQueryString('http://example.com/path?query=value&param=123#fragment')─┐ β”‚ http://example.com/pa...
{"source_file": "url-functions.md"}
[ -0.05094064772129059, 0.028725972399115562, 0.04294683784246445, 0.03338225558400154, -0.052848931401968, 0.009453849866986275, 0.06906652450561523, 0.001486615277826786, 0.0336422473192215, -0.0596204474568367, -0.0035634564701467752, -0.03644954040646553, 0.020244577899575233, -0.0301945...
efb4a6ad-bb14-4580-9e9e-abd4c8ab85f6
```yaml public_suffix_list.dat ``` Syntax sql cutToFirstSignificantSubdomainCustom(url, tld_list_name) Arguments url β€” URL or domain string to process. String tld_list_name β€” Name of the custom TLD list configured in ClickHouse. const String Returned value Returns the part of the doma...
{"source_file": "url-functions.md"}
[ -0.022537628188729286, -0.04199008271098137, 0.008791659027338028, -0.05830393359065056, -0.026232309639453888, -0.09005293995141983, 0.024159977212548256, 0.02262309566140175, -0.001851760665886104, 0.02041737735271454, 0.01610875315964222, -0.038435742259025574, -0.021152736619114876, -0...
5aa4e58e-f5aa-4d2d-8dad-a4038003f712
Examples Usage example sql title=Query SELECT cutToFirstSignificantSubdomainCustomWithWWW('www.foo', 'public_suffix_list'); response title=Response β”Œβ”€cutToFirstSignificantSubdomainCustomWithWWW('www.foo', 'public_suffix_list')─┐ β”‚ www.foo β”‚ └───...
{"source_file": "url-functions.md"}
[ -0.05465582758188248, -0.025212762877345085, -0.009370354004204273, -0.05876559391617775, -0.03737879544496536, -0.09107708930969238, 0.014457782730460167, 0.038103602826595306, -0.010087460279464722, 0.017505336552858353, 0.018231213092803955, -0.04106529802083969, 0.023136839270591736, -...
ebf8a132-5c79-4cb2-b62a-5d0d0f2d0fdf
cutToFirstSignificantSubdomainWithWWW {#cutToFirstSignificantSubdomainWithWWW} Introduced in: v20.12 Returns the part of the domain that includes top-level subdomains up to the "first significant subdomain", without stripping 'www.'. Similar to cutToFirstSignificantSubdomain but preserves the 'www.' prefix if p...
{"source_file": "url-functions.md"}
[ 0.009057939983904362, -0.028426017612218857, 0.036473389714956284, -0.041743502020835876, -0.022951066493988037, -0.09958530962467194, 0.030448170378804207, -0.03940865024924278, 0.015996607020497322, 0.006647753529250622, 0.000861273321788758, -0.062198739498853683, -0.00030242628417909145,...
ac4a26f3-feb3-4ccd-a8cc-c61a73e4610b
cutURLParameter {#cutURLParameter} Introduced in: v1.1 Removes the name parameter from a URL, if present. This function does not encode or decode characters in parameter names, e.g. Client ID and Client%20ID are treated as different parameter names. Syntax sql cutURLParameter(url, name) Arguments ur...
{"source_file": "url-functions.md"}
[ -0.027431130409240723, 0.035309869796037674, -0.0014921554829925299, 0.03307681530714035, -0.1423465460538864, -0.049705907702445984, 0.0037824921309947968, -0.04960411414504051, 0.005920090712606907, 0.011542610824108124, 0.030667169019579887, -0.05025269463658333, 0.019100306555628777, -...
049987e7-5e99-4e64-88b9-ad18bb4e236d
Introduced in: v1.1 Extracts the hostname from a URL. The URL can be specified with or without a protocol. Syntax sql domain(url) Arguments url β€” URL. String Returned value Returns the host name if the input string can be parsed as a URL, otherwise an empty string. String Examples Usage examp...
{"source_file": "url-functions.md"}
[ -0.051788344979286194, -0.07503188401460648, -0.06452620029449463, 0.002294011879712343, -0.017329121008515358, -0.11648423969745636, 0.009957721456885338, -0.006673752795904875, 0.04296014457941055, -0.027038246393203735, 0.000019646746295620687, -0.011867971159517765, 0.018634019419550896,...
0e87d664-fce0-42cd-a114-58c10d3f636f
response title=Response β”Œβ”€domainWithoutWWW('http://user:password@www.example.com:8080/path?query=value#fragment')─┬─domainWithoutWWWRFC('http://user:password@www.example.com:8080/path?query=value#fragment')─┐ β”‚ β”‚ example.com ...
{"source_file": "url-functions.md"}
[ -0.04454997554421425, -0.04474275931715965, -0.017513863742351532, -0.01460795197635889, -0.055919669568538666, -0.008214449509978294, -0.00593806616961956, -0.010676640085875988, 0.021186061203479767, -0.0335826501250267, 0.004231805447489023, -0.043343815952539444, 0.0781477764248848, -0...
ed6f2c37-a4e9-493d-aa76-2c2ff2c77535
extractURLParameterNames {#extractURLParameterNames} Introduced in: v1.1 Returns an array of name strings corresponding to the names of URL parameters. The values are not decoded. Syntax sql extractURLParameterNames(url) Arguments url β€” URL. String Returned value Returns an array of name strings c...
{"source_file": "url-functions.md"}
[ -0.0569194033741951, -0.009495045989751816, -0.0390506274998188, 0.057110488414764404, -0.06239322945475578, -0.04990696534514427, 0.06609019637107849, -0.029317913576960564, 0.006906827911734581, -0.023423142731189728, -0.007804316934198141, -0.01163253653794527, 0.044427331537008286, -0....
b642ab50-adb4-4759-932c-b03d116a72fd
netloc {#netloc} Introduced in: v20.5 Extracts network locality ( username:password@host:port ) from a URL. Syntax sql netloc(url) Arguments url β€” URL. String Returned value Returns username:password@host:port from a given URL. String Examples Usage example sql title=Query SELECT netloc('...
{"source_file": "url-functions.md"}
[ -0.024795880541205406, -0.07371967285871506, -0.03516685590147972, 0.05565075948834419, -0.0923273041844368, -0.047527048736810684, 0.03641564026474953, 0.008364333771169186, 0.009128987789154053, -0.015466946177184582, -0.020234819501638412, -0.005879309494048357, 0.021958475932478905, -0...
cf34106a-1077-48d6-b8a0-c93810db0c2b
Syntax sql portRFC(url[, default_port]) Arguments url β€” URL. String default_port β€” Optional. The default port number to be returned. 0 by default. UInt16 Returned value Returns the port or the default port if there is no port in the URL or in case of a validation error. UInt16 Examples Usage ...
{"source_file": "url-functions.md"}
[ -0.0723685547709465, -0.03816935792565346, -0.09693082422018051, -0.037392277270555496, -0.053228434175252914, -0.10920621454715729, 0.025590920820832253, -0.0055869873613119125, -0.044286806136369705, -0.042327944189310074, 0.059805288910865784, 0.015012607909739017, 0.0031252196058630943, ...
54f2a69c-3c66-4ec8-a700-74a03a2a6938
Examples Usage example sql title=Query SELECT topLevelDomain('svn+ssh://www.some.svn-hosting.com:80/repo/trunk'); response title=Response β”Œβ”€topLevelDomain('svn+ssh://www.some.svn-hosting.com:80/repo/trunk')─┐ β”‚ com β”‚ └─────────────────────────────────...
{"source_file": "url-functions.md"}
[ -0.01932387985289097, -0.04932890832424164, -0.03914673253893852, -0.011570421978831291, -0.05297914519906044, -0.09538223594427109, -0.021993910893797874, 0.024843893945217133, 0.03754048049449921, -0.03295484557747841, -0.023121442645788193, -0.061664752662181854, 0.04700196161866188, -0...
f4abf74d-1cf1-4acc-b482-0b007e6ec0fb
description: 'Documentation for encoding functions' sidebar_label: 'Encoding' slug: /sql-reference/functions/encoding-functions title: 'Encoding functions' keywords: ['encoding', 'regular functions', 'encode', 'decode'] doc_type: 'reference' Encoding functions bech32Decode {#bech32Decode} Introduced in: v25...
{"source_file": "encoding-functions.md"}
[ 0.01796361617743969, -0.004906814079731703, -0.05904068052768707, 0.010620342567563057, -0.07182144373655319, 0.014044497162103653, 0.05490444228053093, -0.014351099729537964, -0.04537881165742874, -0.00663487333804369, -0.04314140975475311, -0.042022597044706345, 0.03222484514117241, -0.1...
159d5037-5e43-461c-b578-4ba35ae644fd
response title=Response bc1w508d6qejxtdg4y5r3zarvary0c5xw7k8zcwmq Bech32 algorithm sql title=Query -- A witness version of 0 will result in a different address string. SELECT bech32Encode('bc', unhex('751e76e8199196d454941c45d1b3a323f1433bd6'), 0) response title=Response bc1w508d6qejxtdg4y5r3zarvary0c5xw7kj7gz7z ...
{"source_file": "encoding-functions.md"}
[ 0.01326151005923748, 0.055226173251867294, 0.038815587759017944, -0.0010370807722210884, -0.07455359399318695, 0.016151444986462593, 0.009032036177814007, -0.06864847242832184, 0.008089008741080761, 0.016152814030647278, -0.041457649320364, -0.12078803032636642, 0.029025482013821602, -0.05...
be70b45c-247c-4165-8dba-fee443697d0a
Syntax sql bin(arg) Arguments arg β€” A value to convert to binary. String or FixedString or (U)Int* or Float* or Decimal or Date or DateTime Returned value Returns a string with the binary representation of the argument. String Examples Simple integer sql title=Query SELECT bin(14) r...
{"source_file": "encoding-functions.md"}
[ 0.09074559807777405, 0.022608676925301552, -0.11403637379407883, 0.04332786798477173, -0.08467885106801987, -0.024182016029953957, 0.07159890234470367, 0.05105225741863251, -0.04746418446302414, 0.0307928454130888, -0.0874849483370781, -0.07421249896287918, 0.05521157383918762, -0.04600124...
17c5af77-736c-489b-91d5-45b1128deaf0
Returns an array with the ascendingly ordered powers of two which sum up to the input number. Array(UInt64) Examples Basic example sql title=Query SELECT bitmaskToArray(50) AS powers_of_two response title=Response β”Œβ”€powers_of_two───┐ β”‚ [2, 16, 32] β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ Single power of two sql title=Que...
{"source_file": "encoding-functions.md"}
[ 0.040159646421670914, 0.09911098331212997, -0.07477452605962753, 0.06809060275554657, -0.11660584807395935, -0.07382870465517044, 0.07633376866579056, 0.005895751528441906, -0.06791485100984573, -0.03072984144091606, -0.1000199168920517, -0.054642826318740845, 0.038394030183553696, -0.0170...
116634c5-614b-4b2e-bf94-8e00566149e2
hex {#hex} Introduced in: v1.1 Returns a string containing the argument's hexadecimal representation according to the following logic for different types: | Type | Description ...
{"source_file": "encoding-functions.md"}
[ 0.06030441075563431, 0.08649371564388275, -0.029553906992077827, -0.011753437109291553, -0.07807497680187225, 0.02628275752067566, 0.053525328636169434, 0.06368681788444519, 0.008431843481957912, -0.023289434611797333, 0.016031833365559578, -0.04862922057509422, 0.037288401275873184, 0.017...
f8a2bf11-6cba-4a11-9c28-ed39201c9dc2
Examples Simple integer sql title=Query SELECT hex(1) response title=Response 01 Float32 numbers sql title=Query SELECT hex(toFloat32(number)) AS hex_presentation FROM numbers(15, 2) response title=Response β”Œβ”€hex_presentation─┐ β”‚ 00007041 β”‚ β”‚ 00008041 β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ Float64 numbers...
{"source_file": "encoding-functions.md"}
[ 0.002799384295940399, -0.0033506618347018957, -0.07359596341848373, -0.0108622582629323, -0.03763458505272865, -0.014516938477754593, 0.014686749316751957, 0.02264188602566719, -0.058149080723524094, -0.0604836642742157, -0.009152663871645927, -0.07904548943042755, 0.033636678010225296, -0...