Skip to Content
Presto实战
book

Presto实战

by Matt Fuller, Manfred Moser, Martin Traverso
March 2021
Intermediate to advanced
265 pages
6h 50m
Chinese
Posts & Telecom Press
Content preview from Presto实战
156
9
下面是该函数的一个实例——解析
URL
参数:
SELECT split_to_map('userid=1234&reftype=email&device=mobile', '&', '=');
_col0
---------------------------------------------
{device=mobile, userid=1234, reftype=email}
(1 row)
当同一个键出现多次时,
split_to_map
函数会返回错误。
类似的函数
split_to_multimap
可以在一个键重复出现时使用。假定前面的例子中有一个
重复的
device
项:
SELECT
split_to_multimap(
'userid=1234&reftype=email&device=mobile&device=desktop',
'&',
'=');
------------------------------------------------------------
{device=[mobile, desktop], userid=[1234], reftype=[email]}
(1 row)
9.12
 
Unicode
如表
9-8
所示,
Presto
提供了一组
Unicode
函数
。这些函数可以在
UTF-8
有效编码的
Unicode
码点上工作。这些函数区别对待每个码点,即使多个码点表示单个字符时也是如此。
9-8:与Unicode编码相关的函数
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

大数据项目管理:从规划到实现

大数据项目管理:从规划到实现

Ted Malaska, Jonathan Seidman
Google系统架构解密: 构建安全可靠的系统

Google系统架构解密: 构建安全可靠的系统

Heather Adkins, Betsy Beyer, Paul Blankinship, Piotr Lewandowski, Ana Oprea, Adam Stubblefield

Publisher Resources

ISBN: 9787115560056