Skip to Content
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
Explore Skills
Cloud Computing
Microsoft Azure
Amazon Web Services (AWS)
Google Cloud
Cloud Migration
Cloud Deployment
Cloud Platforms
Data Engineering
Data Warehouse
SQL
Apache Spark
Microsoft SQL Server
MySQL
Kafka
Data Lake
Streaming & Messaging
NoSQL Databases
Relational Databases
Data Science
Pandas
R
MATLAB
SAS
D3
Power BI
Tableau
Statistics
Exploratory Data Analysis
Data Visualization
AI & ML
Generative AI
Machine Learning
Artificial Intelligence (AI)
Deep Learning
Reinforcement Learning
Natural Language Processing
TensorFlow
Scikit-Learn
Hyperparameter Tuning
MLOps
Programming Languages
Java
JavaScript
Spring
Python
Go
C#
C++
C
Swift
Rust
Functional Programming
Software Architecture
Object-Oriented
Distributed Systems
Domain-Driven Design
Architectural Patterns
IT/Ops
Kubernetes
Docker
GitHub
Terraform
Continuous Delivery
Continuous Integration
Database Administration
Computer Networking
Operating Systems
IT Certifications
Security
Network Security
Application Security
Incident Response
Zero Trust Model
Disaster Recovery
Penetration Testing / Ethical Hacking
Governance
Malware
Security Architecture
Security Engineering
Security Certifications
Design
Web Design
Graphic Design
Interaction Design
Film & Video
User Experience (UX)
Design Process
Design Tools
Business
Agile
Project Management
Product Management
Marketing
Human Resources
Finance
Team Management
Business Strategy
Digital Transformation
Organizational Leadership
Soft Skills
Professional Communication
Emotional Intelligence
Presentation Skills
Innovation
Critical Thinking
Public Speaking
Collaboration
Personal Productivity
Confidence / Motivation
Features
All features
Verifiable skills
AI Academy
Courses
Certifications
Interactive learning
Live events
Superstreams
Answers
Insights reporting
Radar Blog
Buy Courses
Plans
Sign In
Try Now
O'Reilly Platform
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实战
170
|
第
9
章
输出值的转换,用
->
隔开:
x -> x + 1
(x, y) -> x + y
x -> IF(x > 0, x, -x)
x -> x+1 (x, y) -> x + y x -> IF(x > 0, x, -x)
其他常用到
lambda
表达式的函数有
transform
、
filter
、
reduce
、
array_sort
、
none_match
、
any_match
和
all_match
等。
让我们看下面这个例子:
SELECT zip_with(ARRAY[1, 2, 6, 2, 5],
ARRAY[3, 4, 2, 5, 7],
(x, y) -> x + y);
[4, 6, 8, 7, 12]
如你所见,
lambda
表达式很简单但功能强大。它将两个数组中相同位置的元素相加,用
结果创建一个新的数组。简单来说,对两个数组同时进行迭代,每次迭代时都会调用该函
数,而无须编写代码来循环遍历数组数据结构。
9.21
地理空间函数
Presto
所支持的
SQL
超出了标准
SQL
的范围,它包括了地理空间分析领域的一系列重要
函数。与其他支持的
SQL
特性一样
,
Presto
在这方面与其他工具的相关标准和使用方法尽
量保持一致。
在
地理空间函数
方面,
Presto
使用
ST_
前缀支持
SQL/MM
规范和开放地理空间信息联盟
(
OGC
)的
OpenGIS
规范。
因为对地理空间的
SQL
支持内容很多,所以本节只对此进行粗略的介绍。
Presto
支持众多的构造器从数据源处来创建地理空间对象:
•
ST_GeometryFromText(varchar) ...
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
数据库系统内幕
Alex Petrov
云原生:运用容器、函数计算和数据构建下一代应用
Boris Scholl, Trent Swanson, Peter Jausovec
Google系统架构解密: 构建安全可靠的系统
Heather Adkins, Betsy Beyer, Paul Blankinship, Piotr Lewandowski, Ana Oprea, Adam Stubblefield
Publisher Resources
ISBN: 9787115560056