blob: bc07282a1675a89166166992ea18c54caa04dec0 [file] [log] [blame]
<!-- HTML header for doxygen 1.8.4-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="keywords" content="madlib,postgres,greenplum,machine learning,data mining,deep learning,ensemble methods,data science,market basket analysis,affinity analysis,pca,lda,regression,elastic net,huber white,proportional hazards,k-means,latent dirichlet allocation,bayes,support vector machines,svm"/>
<title>MADlib: sketch.sql_in File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<!-- hack in the navigation tree -->
<script type="text/javascript" src="eigen_navtree_hacks.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="madlib_extra.css" rel="stylesheet" type="text/css"/>
<!-- google analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-45382226-1', 'madlib.apache.org');
ga('send', 'pageview');
</script>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><a href="http://madlib.apache.org"><img alt="Logo" src="madlib.png" height="50" style="padding-left:0.5em;" border="0"/ ></a></td>
<td style="padding-left: 0.5em;">
<div id="projectname">
<span id="projectnumber">1.16</span>
</div>
<div id="projectbrief">User Documentation for Apache MADlib</div>
</td>
<td> <div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('sketch_8sql__in.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">sketch.sql_in File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>SQL functions for sketch-based approximations of descriptive statistics.
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a335fba86bbb3fb5a3284808cc64b8f16"><td class="memItemLeft" align="right" valign="top">bytea&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sketch_8sql__in.html#a335fba86bbb3fb5a3284808cc64b8f16">big_or</a> (bytea bitmap1, bytea bitmap2)</td></tr>
<tr class="separator:a335fba86bbb3fb5a3284808cc64b8f16"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a585c96bea2300c0c842eb45799e1fe8b"><td class="memItemLeft" align="right" valign="top">bytea&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sketch_8sql__in.html#a585c96bea2300c0c842eb45799e1fe8b">__fmsketch_trans</a> (bytea bitmaps, anyelement input)</td></tr>
<tr class="separator:a585c96bea2300c0c842eb45799e1fe8b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade6f6fd17475164c6c6d23cdd9752fca"><td class="memItemLeft" align="right" valign="top">int8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sketch_8sql__in.html#ade6f6fd17475164c6c6d23cdd9752fca">__fmsketch_count_distinct</a> (bytea bitmaps)</td></tr>
<tr class="separator:ade6f6fd17475164c6c6d23cdd9752fca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af38dd060ed896681f4587648e3e424ed"><td class="memItemLeft" align="right" valign="top">bytea&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sketch_8sql__in.html#af38dd060ed896681f4587648e3e424ed">__fmsketch_merge</a> (bytea bitmaps1, bytea bitmaps2)</td></tr>
<tr class="separator:af38dd060ed896681f4587648e3e424ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae27d5aaa5e4b426bcfe55e05a89c8e0b"><td class="memItemLeft" align="right" valign="top">aggregate bytea&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sketch_8sql__in.html#ae27d5aaa5e4b426bcfe55e05a89c8e0b">fmsketch_dcount</a> (anyelement column)</td></tr>
<tr class="memdesc:ae27d5aaa5e4b426bcfe55e05a89c8e0b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Flajolet-Martin's distinct count estimation. <a href="#ae27d5aaa5e4b426bcfe55e05a89c8e0b">More...</a><br /></td></tr>
<tr class="separator:ae27d5aaa5e4b426bcfe55e05a89c8e0b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a75cd2be76765b34d62ed8c082281d800"><td class="memItemLeft" align="right" valign="top">bytea&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sketch_8sql__in.html#a75cd2be76765b34d62ed8c082281d800">__cmsketch_int8_trans</a> (bytea bitmaps, int8 input)</td></tr>
<tr class="separator:a75cd2be76765b34d62ed8c082281d800"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae8e48dccef6bb071a05af06ed85cde2d"><td class="memItemLeft" align="right" valign="top">bytea&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sketch_8sql__in.html#ae8e48dccef6bb071a05af06ed85cde2d">__cmsketch_int8_trans</a> (bytea bitmaps, int8 input, int8 arg1)</td></tr>
<tr class="separator:ae8e48dccef6bb071a05af06ed85cde2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23bffd8efabca2a03dacd5e95f3cdb32"><td class="memItemLeft" align="right" valign="top">bytea&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sketch_8sql__in.html#a23bffd8efabca2a03dacd5e95f3cdb32">__cmsketch_int8_trans</a> (bytea bitmaps, int8 input, int8 arg1, int8 arg2)</td></tr>
<tr class="separator:a23bffd8efabca2a03dacd5e95f3cdb32"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac3bf881894a534b20a98d98f7370f845"><td class="memItemLeft" align="right" valign="top">bytea&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sketch_8sql__in.html#ac3bf881894a534b20a98d98f7370f845">__cmsketch_int8_trans</a> (bytea bitmaps, int8 input, int8 arg1, int8 arg2, int8 arg3)</td></tr>
<tr class="separator:ac3bf881894a534b20a98d98f7370f845"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae2407a3372bcaf029785164794667566"><td class="memItemLeft" align="right" valign="top">text&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sketch_8sql__in.html#ae2407a3372bcaf029785164794667566">__cmsketch_base64_final</a> (bytea sketch)</td></tr>
<tr class="separator:ae2407a3372bcaf029785164794667566"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b7e9896cacb126cd82d2a12fc4a5067"><td class="memItemLeft" align="right" valign="top">bytea&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sketch_8sql__in.html#a4b7e9896cacb126cd82d2a12fc4a5067">__cmsketch_merge</a> (bytea, bytea)</td></tr>
<tr class="separator:a4b7e9896cacb126cd82d2a12fc4a5067"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae6671bfb7474db7d8b5c9dada29f36ab"><td class="memItemLeft" align="right" valign="top">aggregate bytea&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sketch_8sql__in.html#ae6671bfb7474db7d8b5c9dada29f36ab">cmsketch</a> (int8 column)</td></tr>
<tr class="memdesc:ae6671bfb7474db7d8b5c9dada29f36ab"><td class="mdescLeft">&#160;</td><td class="mdescRight"><code>cmsketch</code> is a UDA that can be run on columns of type int8, or any column that can be cast to an int8. It produces a base64 string representing a CountMin sketch: a large array of counters that is intended to be passed into a UDF like <code>cmsketch_width_histogram</code> described below. <a href="#ae6671bfb7474db7d8b5c9dada29f36ab">More...</a><br /></td></tr>
<tr class="separator:ae6671bfb7474db7d8b5c9dada29f36ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3498d2c778d1289154f61d34e84c609e"><td class="memItemLeft" align="right" valign="top">int8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sketch_8sql__in.html#a3498d2c778d1289154f61d34e84c609e">cmsketch_count</a> (text sketches64, int8 val)</td></tr>
<tr class="memdesc:a3498d2c778d1289154f61d34e84c609e"><td class="mdescLeft">&#160;</td><td class="mdescRight"><code>cmsketch_count</code> is a scalar UDF to compute the approximate number of occurences of a value in a column summarized by a cmsketch. Takes the results of the <code>cmsketch</code> aggregate as its first argument, and the desired value as the second. <a href="#a3498d2c778d1289154f61d34e84c609e">More...</a><br /></td></tr>
<tr class="separator:a3498d2c778d1289154f61d34e84c609e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeff9e36cfb3338c4e405d4ac77d3968c"><td class="memItemLeft" align="right" valign="top">int8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sketch_8sql__in.html#aeff9e36cfb3338c4e405d4ac77d3968c">cmsketch_rangecount</a> (text sketches64, int8 bot, int8 top)</td></tr>
<tr class="memdesc:aeff9e36cfb3338c4e405d4ac77d3968c"><td class="mdescLeft">&#160;</td><td class="mdescRight"><code>cmsketch_rangecount</code> is a scalar UDF to approximate the number of occurrences of values in the range <code>[lo,hi]</code> inclusive, given a cmsketch of a column. Takes the results of the <code>cmsketch</code> aggregate as its first argument, and the desired range boundaries as the second and third. <a href="#aeff9e36cfb3338c4e405d4ac77d3968c">More...</a><br /></td></tr>
<tr class="separator:aeff9e36cfb3338c4e405d4ac77d3968c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f2ab2fe3244515f5f73d49690e73b39"><td class="memItemLeft" align="right" valign="top">int8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sketch_8sql__in.html#a2f2ab2fe3244515f5f73d49690e73b39">cmsketch_centile</a> (text sketches64, int8 centile, int8 cnt)</td></tr>
<tr class="memdesc:a2f2ab2fe3244515f5f73d49690e73b39"><td class="mdescLeft">&#160;</td><td class="mdescRight"><code>cmsketch_centile</code> is a scalar UDF to compute a centile value from a cmsketch. Takes the results of the <code>cmsketch</code> aggregate as its first argument, a number between 1 and 99 as the desired centile in the second, and the count of the column as the third. Produces a value from the sketched column that is approximately at the centile's position in sorted order. <a href="#a2f2ab2fe3244515f5f73d49690e73b39">More...</a><br /></td></tr>
<tr class="separator:a2f2ab2fe3244515f5f73d49690e73b39"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ef6428fa7ba4b7f7b1f633e6f8003ea"><td class="memItemLeft" align="right" valign="top">int8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sketch_8sql__in.html#a0ef6428fa7ba4b7f7b1f633e6f8003ea">cmsketch_median</a> (text sketches64, int8 cnt)</td></tr>
<tr class="memdesc:a0ef6428fa7ba4b7f7b1f633e6f8003ea"><td class="mdescLeft">&#160;</td><td class="mdescRight"><code>cmsketch_median</code> is a scalar UDF to compute a median value from a cmsketch. Takes the results of the <code>cmsketch</code> aggregate as its first argument, and the count as the second. Produces a value from the sketched column that is approximately at the halfway position in sorted order. <a href="#a0ef6428fa7ba4b7f7b1f633e6f8003ea">More...</a><br /></td></tr>
<tr class="separator:a0ef6428fa7ba4b7f7b1f633e6f8003ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8482f62849adf40a2c7df78c23ea33a4"><td class="memItemLeft" align="right" valign="top">text&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sketch_8sql__in.html#a8482f62849adf40a2c7df78c23ea33a4">cmsketch_width_histogram</a> (text sketches64, int8 themin, int8 themax, int4 nbuckets)</td></tr>
<tr class="memdesc:a8482f62849adf40a2c7df78c23ea33a4"><td class="mdescLeft">&#160;</td><td class="mdescRight"><code>cmsketch_width_histogram</code> is a scalar UDF that takes three aggregates of a column &ndash; cmsketch, min and max&ndash; as well as a number of buckets, and produces an n-bucket histogram for the column where each bucket has approximately the same width. The output is a text string containing triples {lo, hi, count} representing the buckets; counts are approximate. <a href="#a8482f62849adf40a2c7df78c23ea33a4">More...</a><br /></td></tr>
<tr class="separator:a8482f62849adf40a2c7df78c23ea33a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e6d30f20b724b96249cc4a0f67a279e"><td class="memItemLeft" align="right" valign="top">text&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sketch_8sql__in.html#a9e6d30f20b724b96249cc4a0f67a279e">cmsketch_depth_histogram</a> (text sketches64, int4 nbuckets)</td></tr>
<tr class="memdesc:a9e6d30f20b724b96249cc4a0f67a279e"><td class="mdescLeft">&#160;</td><td class="mdescRight"><code>cmsketch_depth_histogram</code> is a UDA that takes a cmsketch and a number of buckets n, and produces an n-bucket histogram for the column where each bucket has approximately the same count. The output is a text string containing triples {lo, hi, count} representing the buckets; counts are approximate. Note that an equi-depth histogram is equivalent to a spanning set of equi-spaced centiles. <a href="#a9e6d30f20b724b96249cc4a0f67a279e">More...</a><br /></td></tr>
<tr class="separator:a9e6d30f20b724b96249cc4a0f67a279e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af468ecc80e53fed205f475d4e1309995"><td class="memItemLeft" align="right" valign="top">bytea&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sketch_8sql__in.html#af468ecc80e53fed205f475d4e1309995">__mfvsketch_trans</a> (bytea, anyelement, int4)</td></tr>
<tr class="separator:af468ecc80e53fed205f475d4e1309995"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a704f9719f5565960a12e3c9d32aac01d"><td class="memItemLeft" align="right" valign="top">text [][]&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sketch_8sql__in.html#a704f9719f5565960a12e3c9d32aac01d">__mfvsketch_final</a> (bytea)</td></tr>
<tr class="separator:a704f9719f5565960a12e3c9d32aac01d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ebb4ce07471e55aae91478d7a7bd15a"><td class="memItemLeft" align="right" valign="top">bytea&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sketch_8sql__in.html#a3ebb4ce07471e55aae91478d7a7bd15a">__mfvsketch_merge</a> (bytea, bytea)</td></tr>
<tr class="separator:a3ebb4ce07471e55aae91478d7a7bd15a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7da3910af51118f6f2831d00fa287bc2"><td class="memItemLeft" align="right" valign="top">integer&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sketch_8sql__in.html#a7da3910af51118f6f2831d00fa287bc2">__sketch_rightmost_one</a> (bytea, integer, integer)</td></tr>
<tr class="separator:a7da3910af51118f6f2831d00fa287bc2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6f8100369e3d3bfc0567381da082db96"><td class="memItemLeft" align="right" valign="top">integer&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sketch_8sql__in.html#a6f8100369e3d3bfc0567381da082db96">__sketch_leftmost_zero</a> (bytea, integer, integer)</td></tr>
<tr class="separator:a6f8100369e3d3bfc0567381da082db96"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:accad714b33677ecddc1da621d23d56ed"><td class="memItemLeft" align="right" valign="top">bytea&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sketch_8sql__in.html#accad714b33677ecddc1da621d23d56ed">__sketch_array_set_bit_in_place</a> (bytea, integer, integer, integer, integer)</td></tr>
<tr class="separator:accad714b33677ecddc1da621d23d56ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab915f092b747e3a955cbb699afc9c70c"><td class="memItemLeft" align="right" valign="top">aggregate text [][]&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sketch_8sql__in.html#ab915f092b747e3a955cbb699afc9c70c">mfvsketch_top_histogram</a> (anyelement column, int4 number_of_buckets)</td></tr>
<tr class="memdesc:ab915f092b747e3a955cbb699afc9c70c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Produces an n-bucket histogram for a column where each bucket counts one of the most frequent values in the column. The output is an array of doubles {value, count} in descending order of frequency; counts are approximated via CountMin sketches. Ties are handled arbitrarily. <a href="#ab915f092b747e3a955cbb699afc9c70c">More...</a><br /></td></tr>
<tr class="separator:ab915f092b747e3a955cbb699afc9c70c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa2d4c0af50b242731f841c2dd355fc72"><td class="memItemLeft" align="right" valign="top">aggregate bytea&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sketch_8sql__in.html#aa2d4c0af50b242731f841c2dd355fc72">mfvsketch_quick_histogram</a> (anyelement column, int4 number_of_buckets)</td></tr>
<tr class="memdesc:aa2d4c0af50b242731f841c2dd355fc72"><td class="mdescLeft">&#160;</td><td class="mdescRight">On Postgres it works the same way as <a class="el" href="sketch_8sql__in.html#ab915f092b747e3a955cbb699afc9c70c">mfvsketch_top_histogram</a> but, in Greenplum it does parallel aggregation to provide a "quick and dirty" answer. <a href="#aa2d4c0af50b242731f841c2dd355fc72">More...</a><br /></td></tr>
<tr class="separator:aa2d4c0af50b242731f841c2dd355fc72"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><dl class="section date"><dt>Date</dt><dd>April 2011</dd></dl>
<dl class="section see"><dt>See also</dt><dd>For a brief introduction to sketches, see the module description <a class="el" href="group__grp__sketches.html" title="Methods to estimate the number of unique values contained in data. ">Cardinality Estimators</a> </dd></dl>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="ae2407a3372bcaf029785164794667566"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae2407a3372bcaf029785164794667566">&#9670;&nbsp;</a></span>__cmsketch_base64_final()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">text __cmsketch_base64_final </td>
<td>(</td>
<td class="paramtype">bytea&#160;</td>
<td class="paramname"><em>sketch</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a75cd2be76765b34d62ed8c082281d800"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a75cd2be76765b34d62ed8c082281d800">&#9670;&nbsp;</a></span>__cmsketch_int8_trans() <span class="overload">[1/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bytea __cmsketch_int8_trans </td>
<td>(</td>
<td class="paramtype">bytea&#160;</td>
<td class="paramname"><em>bitmaps</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int8&#160;</td>
<td class="paramname"><em>input</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ae8e48dccef6bb071a05af06ed85cde2d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae8e48dccef6bb071a05af06ed85cde2d">&#9670;&nbsp;</a></span>__cmsketch_int8_trans() <span class="overload">[2/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bytea __cmsketch_int8_trans </td>
<td>(</td>
<td class="paramtype">bytea&#160;</td>
<td class="paramname"><em>bitmaps</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int8&#160;</td>
<td class="paramname"><em>input</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int8&#160;</td>
<td class="paramname"><em>arg1</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a23bffd8efabca2a03dacd5e95f3cdb32"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a23bffd8efabca2a03dacd5e95f3cdb32">&#9670;&nbsp;</a></span>__cmsketch_int8_trans() <span class="overload">[3/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bytea __cmsketch_int8_trans </td>
<td>(</td>
<td class="paramtype">bytea&#160;</td>
<td class="paramname"><em>bitmaps</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int8&#160;</td>
<td class="paramname"><em>input</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int8&#160;</td>
<td class="paramname"><em>arg1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int8&#160;</td>
<td class="paramname"><em>arg2</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ac3bf881894a534b20a98d98f7370f845"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac3bf881894a534b20a98d98f7370f845">&#9670;&nbsp;</a></span>__cmsketch_int8_trans() <span class="overload">[4/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bytea __cmsketch_int8_trans </td>
<td>(</td>
<td class="paramtype">bytea&#160;</td>
<td class="paramname"><em>bitmaps</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int8&#160;</td>
<td class="paramname"><em>input</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int8&#160;</td>
<td class="paramname"><em>arg1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int8&#160;</td>
<td class="paramname"><em>arg2</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int8&#160;</td>
<td class="paramname"><em>arg3</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a4b7e9896cacb126cd82d2a12fc4a5067"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4b7e9896cacb126cd82d2a12fc4a5067">&#9670;&nbsp;</a></span>__cmsketch_merge()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bytea __cmsketch_merge </td>
<td>(</td>
<td class="paramtype">bytea&#160;</td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bytea&#160;</td>
<td class="paramname">&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ade6f6fd17475164c6c6d23cdd9752fca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ade6f6fd17475164c6c6d23cdd9752fca">&#9670;&nbsp;</a></span>__fmsketch_count_distinct()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int8 __fmsketch_count_distinct </td>
<td>(</td>
<td class="paramtype">bytea&#160;</td>
<td class="paramname"><em>bitmaps</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="af38dd060ed896681f4587648e3e424ed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af38dd060ed896681f4587648e3e424ed">&#9670;&nbsp;</a></span>__fmsketch_merge()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bytea __fmsketch_merge </td>
<td>(</td>
<td class="paramtype">bytea&#160;</td>
<td class="paramname"><em>bitmaps1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bytea&#160;</td>
<td class="paramname"><em>bitmaps2</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a585c96bea2300c0c842eb45799e1fe8b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a585c96bea2300c0c842eb45799e1fe8b">&#9670;&nbsp;</a></span>__fmsketch_trans()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bytea __fmsketch_trans </td>
<td>(</td>
<td class="paramtype">bytea&#160;</td>
<td class="paramname"><em>bitmaps</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">anyelement&#160;</td>
<td class="paramname"><em>input</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a704f9719f5565960a12e3c9d32aac01d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a704f9719f5565960a12e3c9d32aac01d">&#9670;&nbsp;</a></span>__mfvsketch_final()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">text [][] __mfvsketch_final </td>
<td>(</td>
<td class="paramtype">bytea&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a3ebb4ce07471e55aae91478d7a7bd15a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3ebb4ce07471e55aae91478d7a7bd15a">&#9670;&nbsp;</a></span>__mfvsketch_merge()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bytea __mfvsketch_merge </td>
<td>(</td>
<td class="paramtype">bytea&#160;</td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bytea&#160;</td>
<td class="paramname">&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="af468ecc80e53fed205f475d4e1309995"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af468ecc80e53fed205f475d4e1309995">&#9670;&nbsp;</a></span>__mfvsketch_trans()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bytea __mfvsketch_trans </td>
<td>(</td>
<td class="paramtype">bytea&#160;</td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">anyelement&#160;</td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int4&#160;</td>
<td class="paramname">&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="accad714b33677ecddc1da621d23d56ed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#accad714b33677ecddc1da621d23d56ed">&#9670;&nbsp;</a></span>__sketch_array_set_bit_in_place()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bytea __sketch_array_set_bit_in_place </td>
<td>(</td>
<td class="paramtype">bytea&#160;</td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">integer&#160;</td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">integer&#160;</td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">integer&#160;</td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">integer&#160;</td>
<td class="paramname">&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a6f8100369e3d3bfc0567381da082db96"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6f8100369e3d3bfc0567381da082db96">&#9670;&nbsp;</a></span>__sketch_leftmost_zero()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">integer __sketch_leftmost_zero </td>
<td>(</td>
<td class="paramtype">bytea&#160;</td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">integer&#160;</td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">integer&#160;</td>
<td class="paramname">&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a7da3910af51118f6f2831d00fa287bc2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7da3910af51118f6f2831d00fa287bc2">&#9670;&nbsp;</a></span>__sketch_rightmost_one()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">integer __sketch_rightmost_one </td>
<td>(</td>
<td class="paramtype">bytea&#160;</td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">integer&#160;</td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">integer&#160;</td>
<td class="paramname">&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a335fba86bbb3fb5a3284808cc64b8f16"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a335fba86bbb3fb5a3284808cc64b8f16">&#9670;&nbsp;</a></span>big_or()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bytea big_or </td>
<td>(</td>
<td class="paramtype">bytea&#160;</td>
<td class="paramname"><em>bitmap1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bytea&#160;</td>
<td class="paramname"><em>bitmap2</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ae6671bfb7474db7d8b5c9dada29f36ab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae6671bfb7474db7d8b5c9dada29f36ab">&#9670;&nbsp;</a></span>cmsketch()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">aggregate bytea cmsketch </td>
<td>(</td>
<td class="paramtype">int8&#160;</td>
<td class="paramname"><em>column</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a2f2ab2fe3244515f5f73d49690e73b39"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2f2ab2fe3244515f5f73d49690e73b39">&#9670;&nbsp;</a></span>cmsketch_centile()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int8 cmsketch_centile </td>
<td>(</td>
<td class="paramtype">text&#160;</td>
<td class="paramname"><em>sketches64</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int8&#160;</td>
<td class="paramname"><em>centile</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int8&#160;</td>
<td class="paramname"><em>cnt</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a3498d2c778d1289154f61d34e84c609e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3498d2c778d1289154f61d34e84c609e">&#9670;&nbsp;</a></span>cmsketch_count()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int8 cmsketch_count </td>
<td>(</td>
<td class="paramtype">text&#160;</td>
<td class="paramname"><em>sketches64</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int8&#160;</td>
<td class="paramname"><em>val</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a9e6d30f20b724b96249cc4a0f67a279e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9e6d30f20b724b96249cc4a0f67a279e">&#9670;&nbsp;</a></span>cmsketch_depth_histogram()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">text cmsketch_depth_histogram </td>
<td>(</td>
<td class="paramtype">text&#160;</td>
<td class="paramname"><em>sketches64</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int4&#160;</td>
<td class="paramname"><em>nbuckets</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a0ef6428fa7ba4b7f7b1f633e6f8003ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0ef6428fa7ba4b7f7b1f633e6f8003ea">&#9670;&nbsp;</a></span>cmsketch_median()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int8 cmsketch_median </td>
<td>(</td>
<td class="paramtype">text&#160;</td>
<td class="paramname"><em>sketches64</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int8&#160;</td>
<td class="paramname"><em>cnt</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="aeff9e36cfb3338c4e405d4ac77d3968c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeff9e36cfb3338c4e405d4ac77d3968c">&#9670;&nbsp;</a></span>cmsketch_rangecount()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int8 cmsketch_rangecount </td>
<td>(</td>
<td class="paramtype">text&#160;</td>
<td class="paramname"><em>sketches64</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int8&#160;</td>
<td class="paramname"><em>bot</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int8&#160;</td>
<td class="paramname"><em>top</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a8482f62849adf40a2c7df78c23ea33a4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8482f62849adf40a2c7df78c23ea33a4">&#9670;&nbsp;</a></span>cmsketch_width_histogram()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">text cmsketch_width_histogram </td>
<td>(</td>
<td class="paramtype">text&#160;</td>
<td class="paramname"><em>sketches64</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int8&#160;</td>
<td class="paramname"><em>themin</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int8&#160;</td>
<td class="paramname"><em>themax</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int4&#160;</td>
<td class="paramname"><em>nbuckets</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ae27d5aaa5e4b426bcfe55e05a89c8e0b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae27d5aaa5e4b426bcfe55e05a89c8e0b">&#9670;&nbsp;</a></span>fmsketch_dcount()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">aggregate bytea fmsketch_dcount </td>
<td>(</td>
<td class="paramtype">anyelement&#160;</td>
<td class="paramname"><em>column</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">column</td><td>name </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="aa2d4c0af50b242731f841c2dd355fc72"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa2d4c0af50b242731f841c2dd355fc72">&#9670;&nbsp;</a></span>mfvsketch_quick_histogram()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">aggregate bytea mfvsketch_quick_histogram </td>
<td>(</td>
<td class="paramtype">anyelement&#160;</td>
<td class="paramname"><em>column</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int4&#160;</td>
<td class="paramname"><em>number_of_buckets</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ab915f092b747e3a955cbb699afc9c70c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab915f092b747e3a955cbb699afc9c70c">&#9670;&nbsp;</a></span>mfvsketch_top_histogram()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">aggregate text [][] mfvsketch_top_histogram </td>
<td>(</td>
<td class="paramtype">anyelement&#160;</td>
<td class="paramname"><em>column</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int4&#160;</td>
<td class="paramname"><em>number_of_buckets</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_704eb8350b43e1ca74c0f90ed1ba450e.html">methods</a></li><li class="navelem"><a class="el" href="dir_b0d8a62e5a4314de84ce58e7cd249850.html">sketch</a></li><li class="navelem"><a class="el" href="dir_60056874394c01e6c892c7492b3fbe27.html">src</a></li><li class="navelem"><a class="el" href="dir_c2d3987992538edb8f634d5f4e0fae80.html">pg_gp</a></li><li class="navelem"><a class="el" href="sketch_8sql__in.html">sketch.sql_in</a></li>
<li class="footer">Generated on Tue Jul 2 2019 22:35:50 for MADlib by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
</ul>
</div>
</body>
</html>