blob: 0bbf262ea3bae62fd0628ad4ad4905af8af21179 [file] [log] [blame]
"use strict";(self.webpackChunkdoris_website=self.webpackChunkdoris_website||[]).push([[99718],{15680:(e,n,l)=>{l.d(n,{xA:()=>u,yg:()=>y});var t=l(296540);function r(e,n,l){return n in e?Object.defineProperty(e,n,{value:l,enumerable:!0,configurable:!0,writable:!0}):e[n]=l,e}function o(e,n){var l=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),l.push.apply(l,t)}return l}function a(e){for(var n=1;n<arguments.length;n++){var l=null!=arguments[n]?arguments[n]:{};n%2?o(Object(l),!0).forEach((function(n){r(e,n,l[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(l)):o(Object(l)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(l,n))}))}return e}function s(e,n){if(null==e)return{};var l,t,r=function(e,n){if(null==e)return{};var l,t,r={},o=Object.keys(e);for(t=0;t<o.length;t++)l=o[t],n.indexOf(l)>=0||(r[l]=e[l]);return r}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(t=0;t<o.length;t++)l=o[t],n.indexOf(l)>=0||Object.prototype.propertyIsEnumerable.call(e,l)&&(r[l]=e[l])}return r}var i=t.createContext({}),c=function(e){var n=t.useContext(i),l=n;return e&&(l="function"==typeof e?e(n):a(a({},n),e)),l},u=function(e){var n=c(e.components);return t.createElement(i.Provider,{value:n},e.children)},p="mdxType",h={inlineCode:"code",wrapper:function(e){var n=e.children;return t.createElement(t.Fragment,{},n)}},f=t.forwardRef((function(e,n){var l=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),p=c(l),f=r,y=p["".concat(i,".").concat(f)]||p[f]||h[f]||o;return l?t.createElement(y,a(a({ref:n},u),{},{components:l})):t.createElement(y,a({ref:n},u))}));function y(e,n){var l=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var o=l.length,a=new Array(o);a[0]=f;var s={};for(var i in n)hasOwnProperty.call(n,i)&&(s[i]=n[i]);s.originalType=e,s[p]="string"==typeof e?e:r,a[1]=s;for(var c=2;c<o;c++)a[c]=l[c];return t.createElement.apply(null,a)}return t.createElement.apply(null,l)}f.displayName="MDXCreateElement"},948519:(e,n,l)=>{l.r(n),l.d(n,{assets:()=>i,contentTitle:()=>a,default:()=>h,frontMatter:()=>o,metadata:()=>s,toc:()=>c});var t=l(58168),r=(l(296540),l(15680));const o={title:"HLL_TO_BASE64",language:"zh-CN"},a=void 0,s={unversionedId:"sql-manual/sql-functions/hll-functions/hll-to-base64",id:"sql-manual/sql-functions/hll-functions/hll-to-base64",title:"HLL_TO_BASE64",description:"\x3c!--",source:"@site/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/hll-functions/hll-to-base64.md",sourceDirName:"sql-manual/sql-functions/hll-functions",slug:"/sql-manual/sql-functions/hll-functions/hll-to-base64",permalink:"/zh-CN/docs/dev/sql-manual/sql-functions/hll-functions/hll-to-base64",draft:!1,tags:[],version:"current",frontMatter:{title:"HLL_TO_BASE64",language:"zh-CN"},sidebar:"docs",previous:{title:"HLL_HASH",permalink:"/zh-CN/docs/dev/sql-manual/sql-functions/hll-functions/hll-hash"},next:{title:"CONV",permalink:"/zh-CN/docs/dev/sql-manual/sql-functions/numeric-functions/conv"}},i={},c=[{value:"hll_to_base64",id:"hll_to_base64",level:2},{value:"description",id:"description",level:3},{value:"Syntax",id:"syntax",level:4},{value:"example",id:"example",level:3},{value:"keywords",id:"keywords",level:3}],u={toc:c},p="wrapper";function h(e){let{components:n,...l}=e;return(0,r.yg)(p,(0,t.A)({},u,l,{components:n,mdxType:"MDXLayout"}),(0,r.yg)("h2",{id:"hll_to_base64"},"hll_to_base64"),(0,r.yg)("h3",{id:"description"},"description"),(0,r.yg)("h4",{id:"syntax"},"Syntax"),(0,r.yg)("p",null,(0,r.yg)("inlineCode",{parentName:"p"},"VARCHAR HLL_TO_BASE64(HLL input)")),(0,r.yg)("p",null,"\u5c06\u4e00\u4e2ahll\u8f6c\u5316\u6210\u4e00\u4e2abase64\u5b57\u7b26\u4e32\u3002\u8f93\u5165\u662fNULL\u7684\u8bdd\u8fd4\u56deNULL\u3002"),(0,r.yg)("h3",{id:"example"},"example"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre"},"mysql> select hll_to_base64(NULL);\n+---------------------+\n| hll_to_base64(NULL) |\n+---------------------+\n| NULL |\n+---------------------+\n1 row in set (0.00 sec)\n\nmysql> select hll_to_base64(hll_empty());\n+----------------------------+\n| hll_to_base64(hll_empty()) |\n+----------------------------+\n| AA== |\n+----------------------------+\n1 row in set (0.02 sec)\n\nmysql> select hll_to_base64(hll_hash('abc'));\n+--------------------------------+\n| hll_to_base64(hll_hash('abc')) |\n+--------------------------------+\n| AQEC5XSzrpDsdw== |\n+--------------------------------+\n1 row in set (0.03 sec)\n\nmysql> select hll_union_agg(hll_from_base64(hll_to_base64(pv))), hll_union_agg(pv) from test_hll;\n+---------------------------------------------------+-------------------+\n| hll_union_agg(hll_from_base64(hll_to_base64(pv))) | hll_union_agg(pv) |\n+---------------------------------------------------+-------------------+\n| 3 | 3 |\n+---------------------------------------------------+-------------------+\n1 row in set (0.04 sec)\n\nmysql> select hll_cardinality(hll_from_base64(hll_to_base64(hll_hash('abc'))));\n+------------------------------------------------------------------+\n| hll_cardinality(hll_from_base64(hll_to_base64(hll_hash('abc')))) |\n+------------------------------------------------------------------+\n| 1 |\n+------------------------------------------------------------------+\n1 row in set (0.04 sec)\n")),(0,r.yg)("h3",{id:"keywords"},"keywords"),(0,r.yg)("p",null,"HLL_TO_BASE64, HLL"))}h.isMDXComponent=!0}}]);