SlideShare a Scribd company logo
1 of 42
Download to read offline
© Hortonworks Inc. 2016
Polyalgebra
Hadoop Summit, April 14, 2016
© Hortonworks Inc. 2016
Julian Hyde @julianhyde
Apache Calcite (VP), Drill, Kylin
Mondrian OLAP
Hortonworks
Thanks:
Jacques Nadeau @intjesus (Dremio/Drill)
Wes McKinney (Cloudera/Arrow)
Who
Tomer Shiran @tshiran
Apache Drill
Dremio
Page‹#› © Hortonworks Inc. 2014
© Hortonworks Inc. 2016
Polyalgebra
An extended form of relational
algebra that encompasses work with
dynamically-typed data, complex
records, streaming and machine
learning that allows for a single
optimization space.
© Hortonworks Inc. 2016
Ecosystem
Calcite
Drill
Arrow
Ibis
Impala
Kudu
Splunk
Cassandra
JDBC
MongoDB
JDBC
Spark
Flink
© Hortonworks Inc. 2016
Ecosystem - data stores
Calcite
Drill
Arrow
Ibis
Impala
Kudu
Splunk
Cassandra
JDBC
MongoDB
JDBC
Spark
Flink
© Hortonworks Inc. 2016
Ecosystem - Engines
Calcite
Drill
Arrow
Ibis
Impala
Kudu
Splunk
Cassandra
JDBC
MongoDB
JDBC
Spark
Flink
© Hortonworks Inc. 2016
Ecosystem - Focus of this talk
Calcite
Drill
Arrow
Ibis
Impala
Kudu
Splunk
Cassandra
JDBC
MongoDB
JDBC
Spark
Flink
© Hortonworks Inc. 2016
HadoopRDBMS
Old world, new world
• Security
• Metadata
• SQL
• Query planning
• Data independence
• Scale
• Late schema
• Choice of front-end
• Choice of engines
• Workload: batch, interactive,
streaming, ML, graph, …
© Hortonworks Inc. 2016
Many front ends, many engines
SQL
Planning
Execution

engine
Planning
User code
Map

Reduce
Tez User code
in Yarn
Spark MongoDB
Hadoop
External

SQL
SQL Spark Storm Cascading HBase Graph
© Hortonworks Inc. 2016
Extension to mathematical set theory
Devised by E.F. Code (IBM) in 1970
Defines the relational database
Operators: select, filter, join, sort, union, etc.
Intermediate format for query planning/optimization
Relational algebra
SQL
Relational
algebra
Runnable
query
plan
Optimization
© Hortonworks Inc. 2016
select d.name, COUNT(*) as c

from Emps as e

join Depts as d

on e.deptno = d.deptno

where e.age < 30

group by d.deptno

having count(*) > 5

order by c desc
Relational algebra
Scan [Emps] Scan [Depts]
Join [e.deptno

= d.deptno]
Filter [e.age < 30]
Aggregate [deptno, COUNT(*) AS c]
Filter [c > 5]
Project [name, c]
Sort [c DESC]
(Column names are simplified. They would usually

be ordinals, e.g. $0 is the first column of the left input.)
© Hortonworks Inc. 2016
select * from (

select zipcode, state

from Emps

union all

select zipcode, state

from Customers)

where state in (‘CA’, ‘TX’)
Relational algebra - Union and sub-query
Scan [Emps] Scan [Customers]
Union [all]
Project [zipcode, state] Project [zipcode, state]
Filter [state IN (‘CA’, ‘TX’)]
© Hortonworks Inc. 2016
insert into Facts

values (‘Meaning of life’, 42),

(‘Clever as clever’, 6)
Relational algebra - Insert and Values
Insert [Facts]
Values [[‘Meaning of life’, 42],
[‘Clever as clever’, 6]]
© Hortonworks Inc. 2016
MySQL
Splunk
Expression tree
 select p.productName, COUNT(*) as c

from splunk.splunk as s

join mysql.products as p

on s.productId = p.productId

where s.action = 'purchase'

group by p.productName

order by c desc
join
Key: product_id
group
Key: product_name

Agg: count
filter
Condition:

action =

'purchase'
sort
Key: c DESC
scan
scan
Table: splunk
Table: products
© Hortonworks Inc. 2016
Splunk
Expression tree

(optimized)
join
Key: product_id
group
Key: product_name

Agg: count
filter
Condition:

action =

'purchase'
sort
Key: c DESC
scan
Table: splunk
MySQL
scan
Table: products
select p.productName, COUNT(*) as c

from splunk.splunk as s

join mysql.products as p

on s.productId = p.productId

where s.action = 'purchase'

group by p.productName

order by c desc
Page‹#› © Hortonworks Inc. 2014
© Hortonworks Inc. 2016
Demo
{sqlline, apache-calcite, .csv, CsvPushProjectOntoTableRule}
© Hortonworks Inc. 2016
Calcite – APIs and SPIs
Cost, statistics
RelOptCost
RelOptCostFactory
RelMetadataProvider
• RelMdColumnUniquensss
• RelMdDistinctRowCount
• RelMdSelectivity
SQL parser
SqlNode

SqlParser

SqlValidator
Transformation rules
RelOptRule
• MergeFilterRule
• PushAggregateThroughUnionRule
• 100+ more
Global transformations
• Unification (materialized view)
• Column trimming
• De-correlation
Relational algebra
RelNode (operator)
• TableScan
• Filter
• Project
• Union
• Aggregate
• …
RelDataType (type)
RexNode (expression)
RelTrait (physical property)
• RelConvention (calling-convention)
• RelCollation (sortedness)
• TBD (bucketedness/distribution)
JDBC driver
Metadata
Schema
Table
Function
• TableFunction
• TableMacro
Lattice
© Hortonworks Inc. 2016
Calcite Planning Process
SQL
parse
tree
Planner
RelNode
Graph
Sql-to-Rel Converter
SqlNode !
RelNode + RexNode
• Node for each node in
Input Plan
• Each node is a Set of
alternate Sub Plans
• Set further divided into
Subsets: based on traits
like sortedness
1. Plan Graph
• Rule: specifies an Operator
sub-graph to match and
logic to generate equivalent
‘better’ sub-graph
• New and original sub-graph
both remain in contention
2. Rules
• RelNodes have Cost &
Cumulative Cost
3. Cost Model
- Used to plug in Schema,
cost formulas
- Filter selectivity
- Join selectivity
- NDV calculations
4. Metadata Providers
Rule Match Queue
- Add Rule matches to Queue
- Apply Rule match
transformations to plan graph
- Iterate for fixed iterations or until
cost doesn’t change
- Match importance based on
cost of RelNode and height
Best RelNode Graph
Translate to
runtime
Logical Plan
Based on “Volcano” & “Cascades” papers [G. Graefe]
© Hortonworks Inc. 2016
Algebra builder API
produces
final FrameworkConfig config;
final RelBuilder builder = RelBuilder.create(config);
final RelNode node = builder
.scan("EMP")
.aggregate(builder.groupKey("DEPTNO"),
builder.count(false, "C"),
builder.sum(false, "S", builder.field("SAL")))
.filter(
builder.call(SqlStdOperatorTable.GREATER_THAN,
builder.field("C"),
builder.literal(10)))
.build();
System.out.println(RelOptUtil.toString(node));
select deptno,

COUNT(*) as c,
sum(sal) as s

from Emp

having COUNT(*) > 10
LogicalFilter(condition=[>($1, 10)])
LogicalAggregate(group=[{7}], C=[COUNT()], S=[SUM($5)])
LogicalTableScan(table=[[scott, EMP]])
Equivalent SQL:
© Hortonworks Inc. 2016
Non-relational, post-relational
Non-relational stores:
• Document databases — MongoDB
• Key-value stores — HBase, Cassandra
• Graph databases — Neo4J
• Multidimensional OLAP — Microsoft Analysis, Mondrian
• Streams — Kafka, Storm
• Text, audio, video
Non-relational operators — data exploration, machine learning
Late or no schema
© Hortonworks Inc. 2016
Complex data, also known as nested or
document-oriented data. Typically, it can be
represented as JSON.



2 new operators are sufficient:
• UNNEST
• COLLECT aggregate function
Complex data employees: [
{
name: “Bob”,
age: 48,
pets: [
{name: “Jim”, type: “Dog”},
{name: “Frank”, type: “Cat”}
]
}, {
name: “Stacy",
age: 31,

starSign: ‘taurus’,
pets: [
{name: “Jack”, type: “Cat”}
]
}, {
name: “Ken”,
age: 23
}
]
© Hortonworks Inc. 2016
Flatten converts arrays of values to
separate rows:
• New record for each list item
• Empty lists removes record
Flatten is actually just syntactic sugar for
the UNNEST relational operator:
UNNEST and Flatten
name age pets
Bob 48 [{name: Jim, type: dog},
{name:Frank, type: dog}]
Stacy 31 [{name: Jack, type: cat}]
Ken 23 []
name age pet
Bob 48 {name: Jim, type: dog}
Bob 48 {name: Frank, type: dog}
Stacy 31 {name: Jack, type: cat}
select e.name, e.age,

flatten(e.pet)

from Employees as e
select e.name, e.age,

row(a.name, a.type)

from Employees as e, 

unnest e.addresses as a
© Hortonworks Inc. 2016
Optimizing UNNEST
As usual, to optimize, we write planner rules.
We can push filters into the non-nested side,
so we write FilterUnnestTransposeRule.
(There are many other possible rules.)
select e.name, a.name

from Employees as e, 

unnest e.pets as a
where e.age < 30
select e.name, a.street

from (

select *

from Employees 

where e.age < 30) as e,
unnest e.addresses as a
FilterUnnestTransposeRule
© Hortonworks Inc. 2016
Optimizing UNNEST (2)
We can also optimize projects.
If table is stored in a column-oriented file
format, this reduces disk reads significantly.
• Array wildcard projection through flatten
• Non-flattened column inclusion
select e.name,

flatten(pets).name

from Employees as e
scan(name, age, pets)
flatten(pets) as pet
project(name, pet.name)
scan(name, pets[*].name)
flatten(pets) as pet
scan(name, age, pets)
flatten(pets as pet)
project(name, pets[*].name)
Original Plan Project through Flatten
Project into scan
(less data read)
ProjectFlattenTransposeRule ProjectScanRule
© Hortonworks Inc. 2016
Evolution:
• Oracle: Schema before write, strongly typed SQL (like Java)
• Hive: Schema before query, strongly typed SQL
• Drill: Schema on data, weakly typed SQL (like JavaScript)
Late schema
name age starSign pets
Bob 48 [{name: Jim, type: dog},
{name:Frank, type: dog}]
Stacy 31 Taurus [{name: Jack, type: cat}]
Ken 23 []
name age pets
Ken 23 []
select *

from Employees
select *

from Employees
where age < 30
no starSign column!
© Hortonworks Inc. 2016
Expanding *
• Early schema databases expand * at planning time, based on schema
• Drill expands * during query execution
• Each operator needs to be able to propagate column names/types as well as data
Internally, Drill is strongly typed
• Strong typing means efficient code
• JavaScript engines do this too
• Infer type for each batch of records
• Throw away generated code if a column changes type in the next batch of records
Implementing schema-on-data
select e.name

from Employees
where e.age < 30
select e._map[“name”] as name

from Employees
where cast(e._map[“age”] as integer) < 30
© Hortonworks Inc. 2016
A table function is a Java UDF that returns a
relation.
• Its arguments may be relations or scalars.
• It appears in the execution plan.
• Annotations indicate whether it is safe to
push filters, project through
A table macro is a Java function that takes a
parse tree and returns a parse tree.
• Named after Lisp macros.
• It does not appear in the execution plan.
• Views (next slide) are a kind of table macro.
Use a table macro rather than a table function,
if possible. Re-use existing optimizations.
User-defined operators
select e.name

from table(
my_sample(
select * from Employees,
0.15))
select e.name

from table(
my_filter(
select * from Employees,
‘age’, ‘<‘, 30))
© Hortonworks Inc. 2016
Views
Scan [Emps]
Join [$0, $5]
Project [$0, $1, $2, $3]
Filter [age >= 50]
Aggregate [deptno, min(salary)]
Scan [Managers]
Aggregate [manager]
Scan [Emps]
select deptno, min(salary)

from Managers
where age >= 50
group by deptno
create view Managers as
select *
from Emps as e
where exists (
select *
from Emps as underling
where underling.manager = e.id)
© Hortonworks Inc. 2016
Views (after expansion)
select deptno, min(salary)

from Managers
where age >= 50
group by deptno
create view Managers as
select *
from Emps as e
where exists (
select *
from Emps as underling
where underling.manager = e.id)
Scan [Emps] Aggregate [manager]
Join [$0, $5]
Project [$0, $1, $2, $3]
Filter [age >= 50]
Aggregate [deptno, min(salary)]
Scan [Emps]
© Hortonworks Inc. 2016
Views (after pushing down filter)
select deptno, min(salary)

from Managers
where age >= 50
group by deptno
create view Managers as
select *
from Emps as e
where exists (
select *
from Emps as underling
where underling.manager = e.id) Scan [Emps]
Scan [Emps]
Join [$0, $5]
Project [$0, $1, $2, $3]
Filter [age >= 50]
Aggregate [deptno, min(salary)]
© Hortonworks Inc. 2016
Materialized view
create materialized view

EmpSummary as

select deptno,

gender,

count(*) as c, 

sum(sal)

from Emps
group by deptno, gender
select count(*) as c

from Emps
where deptno = 10
and gender = ‘M’
Scan [Emps]
Aggregate [deptno, gender,

COUNT(*), SUM(sal)]
Scan [EmpSummary] =
Scan [Emps]
Filter [deptno = 10 AND gender = ‘M’]
Aggregate [COUNT(*)]
© Hortonworks Inc. 2016
Materialized view, step 2: Rewrite query to match
create materialized view

EmpSummary as

select deptno,

gender,

count(*) as c, 

sum(sal)

from Emps
group by deptno, gender
select count(*) as c

from Emps
where deptno = 10
and gender = ‘M’
Scan [Emps]
Aggregate [deptno, gender,

COUNT(*), SUM(sal)]
Scan [EmpSummary] =
Scan [Emps]
Filter [deptno = 10 AND gender = ‘M’]
Aggregate [deptno, gender,

COUNT(*) AS c, SUM(sal) AS s]
Project [c]
© Hortonworks Inc. 2016
Materialized view, step 3: substitute table
create materialized view

EmpSummary as

select deptno,

gender,

count(*) as c, 

sum(sal)

from Emps
group by deptno, gender
select count(*) as c

from Emps
where deptno = 10
and gender = ‘M’
Scan [Emps]
Aggregate [deptno, gender,

COUNT(*), SUM(sal)]
Scan [EmpSummary] =
Filter [deptno = 10 AND gender = ‘M’]
Project [c]
Scan [EmpSummary]
© Hortonworks Inc. 2016
Streaming queries run forever.
Stream appears in the FROM clause: Orders.
Without the stream keyword, Orders means the
history of the stream (a table).
Calcite streaming SQL: in Samza, Storm, Flink.
Streaming queries
select stream *

from Orders
select *

from Orders
© Hortonworks Inc. 2016
• Orders is used as both stream and table
• System determines where to find the records
• Query is invalid if records are not available
Combining past and future
select stream *

from Orders as o

where units > ( 

select avg(units)

from Orders as h

where h.productId = o.productId

and h.rowtime >

o.rowtime - interval ‘1’ year)
© Hortonworks Inc. 2016
Hybrid systems combine more than one data source and/or engine.
Examples:
• Splunk join to MySQL
• User-defined table written in Python reading from an in-memory temporary table just
created by Drill.
• Streaming query populating a table summarizing the last hour’s activity that will be
used to populate a pie chart in a web dashboard.
Two challenges:
• Planning the query to take advantage of each system’s strengths.
• Efficient interchange of data at run time.
Hybrid systems
© Hortonworks Inc. 2016
Hybrid algebra, hybrid run-time
Calcite
Drill
Arrow
Ibis
Impala
Kudu
Splunk
Cassandra
JDBC
MongoDB
JDBC
Spark
Flink
DREMIO© Hortonworks Inc. 2016
Arrow in a Slide
• New Top-level Apache Software Foundation project
– Announced Feb 17, 2016
• Focused on Columnar In-Memory Analytics
1. 10-100x speedup on many workloads
2. Common data layer enables companies to choose best of breed
systems
3. Designed to work with any programming language
4. Support for both relational and complex data as-is
• Developers from 13+ major open source projects involved
– A significant % of the world’s data will be processed through Arrow!
Calcite
Cassandra
Deeplearning4j
Drill
Hadoop
HBase
Ibis
Impala
Kudu
Pandas
Parquet
Phoenix
Spark
Storm
R
DREMIO© Hortonworks Inc. 2016
Focus on CPU Efficiency
Traditional
Memory Buffer
Arrow
Memory Buffer
• Cache Locality
• Super-scalar & vectorized
operation
• Minimal Structure Overhead
• Constant value access
– With minimal structure
overhead
• Operate directly on columnar
compressed data
DREMIO© Hortonworks Inc. 2016
High Performance Sharing & Interchange
Today With Arrow
• Each system has its own internal memory
format
• 70-80% CPU wasted on serialization and
deserialization
• Similar functionality implemented in
multiple projects
• All systems utilize the same memory
format
• No overhead for cross-system
communication
• Projects can share functionality (eg,
Parquet-to-Arrow reader)
© Hortonworks Inc. 2016
• Algebra-centric approach
• Optimize by applying transformation rules
• User-defined operators (table functions, table macros, custom
RelNode classes)
• Complex data
• Late-schema queries
• Streaming queries
• Calcite enables planning hybrid queries
• Arrow enables hybrid runtime
Summary
© Hortonworks Inc. 2016
@julianhyde
@tshiran
@ApacheCalcite
@ApacheDrill
@ApacheArrow
Get involved:
• http://calcite.apache.org
• http://drill.apache.org
• http://arrow.apache.org
Thanks!

More Related Content

What's hot

Apache Hadoop 3.0 Community Update
Apache Hadoop 3.0 Community UpdateApache Hadoop 3.0 Community Update
Apache Hadoop 3.0 Community UpdateDataWorks Summit
 
Have your Cake and Eat it Too - Architecture for Batch and Real-time processing
Have your Cake and Eat it Too - Architecture for Batch and Real-time processingHave your Cake and Eat it Too - Architecture for Batch and Real-time processing
Have your Cake and Eat it Too - Architecture for Batch and Real-time processingDataWorks Summit
 
Hive on spark is blazing fast or is it final
Hive on spark is blazing fast or is it finalHive on spark is blazing fast or is it final
Hive on spark is blazing fast or is it finalHortonworks
 
Hadoop Eagle - Real Time Monitoring Framework for eBay Hadoop
Hadoop Eagle - Real Time Monitoring Framework for eBay HadoopHadoop Eagle - Real Time Monitoring Framework for eBay Hadoop
Hadoop Eagle - Real Time Monitoring Framework for eBay HadoopDataWorks Summit
 
YARN Ready: Apache Spark
YARN Ready: Apache Spark YARN Ready: Apache Spark
YARN Ready: Apache Spark Hortonworks
 
Large-Scale Stream Processing in the Hadoop Ecosystem
Large-Scale Stream Processing in the Hadoop Ecosystem Large-Scale Stream Processing in the Hadoop Ecosystem
Large-Scale Stream Processing in the Hadoop Ecosystem DataWorks Summit/Hadoop Summit
 
How to use Parquet as a Sasis for ETL and Analytics
How to use Parquet as a Sasis for ETL and AnalyticsHow to use Parquet as a Sasis for ETL and Analytics
How to use Parquet as a Sasis for ETL and AnalyticsDataWorks Summit
 
Applied Deep Learning with Spark and Deeplearning4j
Applied Deep Learning with Spark and Deeplearning4jApplied Deep Learning with Spark and Deeplearning4j
Applied Deep Learning with Spark and Deeplearning4jDataWorks Summit
 
Hivemall: Scalable machine learning library for Apache Hive/Spark/Pig
Hivemall: Scalable machine learning library for Apache Hive/Spark/PigHivemall: Scalable machine learning library for Apache Hive/Spark/Pig
Hivemall: Scalable machine learning library for Apache Hive/Spark/PigDataWorks Summit/Hadoop Summit
 
Efficient Data Formats for Analytics with Parquet and Arrow
Efficient Data Formats for Analytics with Parquet and ArrowEfficient Data Formats for Analytics with Parquet and Arrow
Efficient Data Formats for Analytics with Parquet and ArrowDataWorks Summit/Hadoop Summit
 
Transitioning Compute Models: Hadoop MapReduce to Spark
Transitioning Compute Models: Hadoop MapReduce to SparkTransitioning Compute Models: Hadoop MapReduce to Spark
Transitioning Compute Models: Hadoop MapReduce to SparkSlim Baltagi
 

What's hot (20)

Apache Hadoop 3.0 Community Update
Apache Hadoop 3.0 Community UpdateApache Hadoop 3.0 Community Update
Apache Hadoop 3.0 Community Update
 
Have your Cake and Eat it Too - Architecture for Batch and Real-time processing
Have your Cake and Eat it Too - Architecture for Batch and Real-time processingHave your Cake and Eat it Too - Architecture for Batch and Real-time processing
Have your Cake and Eat it Too - Architecture for Batch and Real-time processing
 
Hive on spark is blazing fast or is it final
Hive on spark is blazing fast or is it finalHive on spark is blazing fast or is it final
Hive on spark is blazing fast or is it final
 
Hadoop Eagle - Real Time Monitoring Framework for eBay Hadoop
Hadoop Eagle - Real Time Monitoring Framework for eBay HadoopHadoop Eagle - Real Time Monitoring Framework for eBay Hadoop
Hadoop Eagle - Real Time Monitoring Framework for eBay Hadoop
 
Securing Spark Applications
Securing Spark ApplicationsSecuring Spark Applications
Securing Spark Applications
 
YARN Ready: Apache Spark
YARN Ready: Apache Spark YARN Ready: Apache Spark
YARN Ready: Apache Spark
 
Large-Scale Stream Processing in the Hadoop Ecosystem
Large-Scale Stream Processing in the Hadoop Ecosystem Large-Scale Stream Processing in the Hadoop Ecosystem
Large-Scale Stream Processing in the Hadoop Ecosystem
 
Fishing Graphs in a Hadoop Data Lake
Fishing Graphs in a Hadoop Data Lake Fishing Graphs in a Hadoop Data Lake
Fishing Graphs in a Hadoop Data Lake
 
Time-oriented event search. A new level of scale
Time-oriented event search. A new level of scale Time-oriented event search. A new level of scale
Time-oriented event search. A new level of scale
 
How to use Parquet as a Sasis for ETL and Analytics
How to use Parquet as a Sasis for ETL and AnalyticsHow to use Parquet as a Sasis for ETL and Analytics
How to use Parquet as a Sasis for ETL and Analytics
 
Node Labels in YARN
Node Labels in YARNNode Labels in YARN
Node Labels in YARN
 
Spark Uber Development Kit
Spark Uber Development KitSpark Uber Development Kit
Spark Uber Development Kit
 
Empower Data-Driven Organizations with HPE and Hadoop
Empower Data-Driven Organizations with HPE and HadoopEmpower Data-Driven Organizations with HPE and Hadoop
Empower Data-Driven Organizations with HPE and Hadoop
 
The Heterogeneous Data lake
The Heterogeneous Data lakeThe Heterogeneous Data lake
The Heterogeneous Data lake
 
Applied Deep Learning with Spark and Deeplearning4j
Applied Deep Learning with Spark and Deeplearning4jApplied Deep Learning with Spark and Deeplearning4j
Applied Deep Learning with Spark and Deeplearning4j
 
Hivemall: Scalable machine learning library for Apache Hive/Spark/Pig
Hivemall: Scalable machine learning library for Apache Hive/Spark/PigHivemall: Scalable machine learning library for Apache Hive/Spark/Pig
Hivemall: Scalable machine learning library for Apache Hive/Spark/Pig
 
Efficient Data Formats for Analytics with Parquet and Arrow
Efficient Data Formats for Analytics with Parquet and ArrowEfficient Data Formats for Analytics with Parquet and Arrow
Efficient Data Formats for Analytics with Parquet and Arrow
 
Transitioning Compute Models: Hadoop MapReduce to Spark
Transitioning Compute Models: Hadoop MapReduce to SparkTransitioning Compute Models: Hadoop MapReduce to Spark
Transitioning Compute Models: Hadoop MapReduce to Spark
 
Apache Eagle - Monitor Hadoop in Real Time
Apache Eagle - Monitor Hadoop in Real TimeApache Eagle - Monitor Hadoop in Real Time
Apache Eagle - Monitor Hadoop in Real Time
 
Apache Phoenix + Apache HBase
Apache Phoenix + Apache HBaseApache Phoenix + Apache HBase
Apache Phoenix + Apache HBase
 

Viewers also liked

Apache Calcite overview
Apache Calcite overviewApache Calcite overview
Apache Calcite overviewJulian Hyde
 
Alternatives to Apache Accumulo’s Java API
Alternatives to Apache Accumulo’s Java APIAlternatives to Apache Accumulo’s Java API
Alternatives to Apache Accumulo’s Java APIJosh Elser
 
Updating materialized views and caches using kafka
Updating materialized views and caches using kafkaUpdating materialized views and caches using kafka
Updating materialized views and caches using kafkaZach Cox
 
Planning with Polyalgebra: Bringing Together Relational, Complex and Machine ...
Planning with Polyalgebra: Bringing Together Relational, Complex and Machine ...Planning with Polyalgebra: Bringing Together Relational, Complex and Machine ...
Planning with Polyalgebra: Bringing Together Relational, Complex and Machine ...Julian Hyde
 
Calcite meetup-2016-04-20
Calcite meetup-2016-04-20Calcite meetup-2016-04-20
Calcite meetup-2016-04-20Josh Elser
 
Apache Calcite: One planner fits all
Apache Calcite: One planner fits allApache Calcite: One planner fits all
Apache Calcite: One planner fits allJulian Hyde
 
Cost-based Query Optimization in Apache Phoenix using Apache Calcite
Cost-based Query Optimization in Apache Phoenix using Apache CalciteCost-based Query Optimization in Apache Phoenix using Apache Calcite
Cost-based Query Optimization in Apache Phoenix using Apache CalciteJulian Hyde
 
Introduction to Apache Calcite
Introduction to Apache CalciteIntroduction to Apache Calcite
Introduction to Apache CalciteJordan Halterman
 
SQL on everything, in memory
SQL on everything, in memorySQL on everything, in memory
SQL on everything, in memoryJulian Hyde
 
Streaming SQL (at FlinkForward, Berlin, 2016/09/12)
Streaming SQL (at FlinkForward, Berlin, 2016/09/12)Streaming SQL (at FlinkForward, Berlin, 2016/09/12)
Streaming SQL (at FlinkForward, Berlin, 2016/09/12)Julian Hyde
 

Viewers also liked (10)

Apache Calcite overview
Apache Calcite overviewApache Calcite overview
Apache Calcite overview
 
Alternatives to Apache Accumulo’s Java API
Alternatives to Apache Accumulo’s Java APIAlternatives to Apache Accumulo’s Java API
Alternatives to Apache Accumulo’s Java API
 
Updating materialized views and caches using kafka
Updating materialized views and caches using kafkaUpdating materialized views and caches using kafka
Updating materialized views and caches using kafka
 
Planning with Polyalgebra: Bringing Together Relational, Complex and Machine ...
Planning with Polyalgebra: Bringing Together Relational, Complex and Machine ...Planning with Polyalgebra: Bringing Together Relational, Complex and Machine ...
Planning with Polyalgebra: Bringing Together Relational, Complex and Machine ...
 
Calcite meetup-2016-04-20
Calcite meetup-2016-04-20Calcite meetup-2016-04-20
Calcite meetup-2016-04-20
 
Apache Calcite: One planner fits all
Apache Calcite: One planner fits allApache Calcite: One planner fits all
Apache Calcite: One planner fits all
 
Cost-based Query Optimization in Apache Phoenix using Apache Calcite
Cost-based Query Optimization in Apache Phoenix using Apache CalciteCost-based Query Optimization in Apache Phoenix using Apache Calcite
Cost-based Query Optimization in Apache Phoenix using Apache Calcite
 
Introduction to Apache Calcite
Introduction to Apache CalciteIntroduction to Apache Calcite
Introduction to Apache Calcite
 
SQL on everything, in memory
SQL on everything, in memorySQL on everything, in memory
SQL on everything, in memory
 
Streaming SQL (at FlinkForward, Berlin, 2016/09/12)
Streaming SQL (at FlinkForward, Berlin, 2016/09/12)Streaming SQL (at FlinkForward, Berlin, 2016/09/12)
Streaming SQL (at FlinkForward, Berlin, 2016/09/12)
 

Similar to Polyalgebra

Big Data Processing with .NET and Spark (SQLBits 2020)
Big Data Processing with .NET and Spark (SQLBits 2020)Big Data Processing with .NET and Spark (SQLBits 2020)
Big Data Processing with .NET and Spark (SQLBits 2020)Michael Rys
 
Intro to Spark and Spark SQL
Intro to Spark and Spark SQLIntro to Spark and Spark SQL
Intro to Spark and Spark SQLjeykottalam
 
Spark SQL Deep Dive @ Melbourne Spark Meetup
Spark SQL Deep Dive @ Melbourne Spark MeetupSpark SQL Deep Dive @ Melbourne Spark Meetup
Spark SQL Deep Dive @ Melbourne Spark MeetupDatabricks
 
Cassandra Summit 2014: Apache Spark - The SDK for All Big Data Platforms
Cassandra Summit 2014: Apache Spark - The SDK for All Big Data PlatformsCassandra Summit 2014: Apache Spark - The SDK for All Big Data Platforms
Cassandra Summit 2014: Apache Spark - The SDK for All Big Data PlatformsDataStax Academy
 
Jump Start into Apache® Spark™ and Databricks
Jump Start into Apache® Spark™ and DatabricksJump Start into Apache® Spark™ and Databricks
Jump Start into Apache® Spark™ and DatabricksDatabricks
 
Composable Parallel Processing in Apache Spark and Weld
Composable Parallel Processing in Apache Spark and WeldComposable Parallel Processing in Apache Spark and Weld
Composable Parallel Processing in Apache Spark and WeldDatabricks
 
Cost-based query optimization in Apache Hive 0.14
Cost-based query optimization in Apache Hive 0.14Cost-based query optimization in Apache Hive 0.14
Cost-based query optimization in Apache Hive 0.14Julian Hyde
 
PyconZA19-Distributed-workloads-challenges-with-PySpark-and-Airflow
PyconZA19-Distributed-workloads-challenges-with-PySpark-and-AirflowPyconZA19-Distributed-workloads-challenges-with-PySpark-and-Airflow
PyconZA19-Distributed-workloads-challenges-with-PySpark-and-AirflowChetan Khatri
 
Real-Time Spark: From Interactive Queries to Streaming
Real-Time Spark: From Interactive Queries to StreamingReal-Time Spark: From Interactive Queries to Streaming
Real-Time Spark: From Interactive Queries to StreamingDatabricks
 
Big Data Everywhere Chicago: Apache Spark Plus Many Other Frameworks -- How S...
Big Data Everywhere Chicago: Apache Spark Plus Many Other Frameworks -- How S...Big Data Everywhere Chicago: Apache Spark Plus Many Other Frameworks -- How S...
Big Data Everywhere Chicago: Apache Spark Plus Many Other Frameworks -- How S...BigDataEverywhere
 
Why you care about
 relational algebra (even though you didn’t know it)
Why you care about
 relational algebra (even though you didn’t know it)Why you care about
 relational algebra (even though you didn’t know it)
Why you care about
 relational algebra (even though you didn’t know it)Julian Hyde
 
Enabling Exploratory Analysis of Large Data with Apache Spark and R
Enabling Exploratory Analysis of Large Data with Apache Spark and REnabling Exploratory Analysis of Large Data with Apache Spark and R
Enabling Exploratory Analysis of Large Data with Apache Spark and RDatabricks
 
Apache Calcite (a tutorial given at BOSS '21)
Apache Calcite (a tutorial given at BOSS '21)Apache Calcite (a tutorial given at BOSS '21)
Apache Calcite (a tutorial given at BOSS '21)Julian Hyde
 
AWS November Webinar Series - Advanced Analytics with Amazon Redshift and the...
AWS November Webinar Series - Advanced Analytics with Amazon Redshift and the...AWS November Webinar Series - Advanced Analytics with Amazon Redshift and the...
AWS November Webinar Series - Advanced Analytics with Amazon Redshift and the...Amazon Web Services
 
Big Data Web applications for Interactive Hadoop by ENRICO BERTI at Big Data...
 Big Data Web applications for Interactive Hadoop by ENRICO BERTI at Big Data... Big Data Web applications for Interactive Hadoop by ENRICO BERTI at Big Data...
Big Data Web applications for Interactive Hadoop by ENRICO BERTI at Big Data...Big Data Spain
 
Enterprise Data Workflows with Cascading and Windows Azure HDInsight
Enterprise Data Workflows with Cascading and Windows Azure HDInsightEnterprise Data Workflows with Cascading and Windows Azure HDInsight
Enterprise Data Workflows with Cascading and Windows Azure HDInsightPaco Nathan
 
ScalaTo July 2019 - No more struggles with Apache Spark workloads in production
ScalaTo July 2019 - No more struggles with Apache Spark workloads in productionScalaTo July 2019 - No more struggles with Apache Spark workloads in production
ScalaTo July 2019 - No more struggles with Apache Spark workloads in productionChetan Khatri
 
The openCypher Project - An Open Graph Query Language
The openCypher Project - An Open Graph Query LanguageThe openCypher Project - An Open Graph Query Language
The openCypher Project - An Open Graph Query LanguageNeo4j
 

Similar to Polyalgebra (20)

Big Data Processing with .NET and Spark (SQLBits 2020)
Big Data Processing with .NET and Spark (SQLBits 2020)Big Data Processing with .NET and Spark (SQLBits 2020)
Big Data Processing with .NET and Spark (SQLBits 2020)
 
Intro to Spark and Spark SQL
Intro to Spark and Spark SQLIntro to Spark and Spark SQL
Intro to Spark and Spark SQL
 
Spark SQL Deep Dive @ Melbourne Spark Meetup
Spark SQL Deep Dive @ Melbourne Spark MeetupSpark SQL Deep Dive @ Melbourne Spark Meetup
Spark SQL Deep Dive @ Melbourne Spark Meetup
 
Cassandra Summit 2014: Apache Spark - The SDK for All Big Data Platforms
Cassandra Summit 2014: Apache Spark - The SDK for All Big Data PlatformsCassandra Summit 2014: Apache Spark - The SDK for All Big Data Platforms
Cassandra Summit 2014: Apache Spark - The SDK for All Big Data Platforms
 
Jump Start into Apache® Spark™ and Databricks
Jump Start into Apache® Spark™ and DatabricksJump Start into Apache® Spark™ and Databricks
Jump Start into Apache® Spark™ and Databricks
 
Composable Parallel Processing in Apache Spark and Weld
Composable Parallel Processing in Apache Spark and WeldComposable Parallel Processing in Apache Spark and Weld
Composable Parallel Processing in Apache Spark and Weld
 
Cost-based query optimization in Apache Hive 0.14
Cost-based query optimization in Apache Hive 0.14Cost-based query optimization in Apache Hive 0.14
Cost-based query optimization in Apache Hive 0.14
 
PyconZA19-Distributed-workloads-challenges-with-PySpark-and-Airflow
PyconZA19-Distributed-workloads-challenges-with-PySpark-and-AirflowPyconZA19-Distributed-workloads-challenges-with-PySpark-and-Airflow
PyconZA19-Distributed-workloads-challenges-with-PySpark-and-Airflow
 
Real-Time Spark: From Interactive Queries to Streaming
Real-Time Spark: From Interactive Queries to StreamingReal-Time Spark: From Interactive Queries to Streaming
Real-Time Spark: From Interactive Queries to Streaming
 
Big Data Everywhere Chicago: Apache Spark Plus Many Other Frameworks -- How S...
Big Data Everywhere Chicago: Apache Spark Plus Many Other Frameworks -- How S...Big Data Everywhere Chicago: Apache Spark Plus Many Other Frameworks -- How S...
Big Data Everywhere Chicago: Apache Spark Plus Many Other Frameworks -- How S...
 
Why you care about
 relational algebra (even though you didn’t know it)
Why you care about
 relational algebra (even though you didn’t know it)Why you care about
 relational algebra (even though you didn’t know it)
Why you care about
 relational algebra (even though you didn’t know it)
 
Enabling Exploratory Analysis of Large Data with Apache Spark and R
Enabling Exploratory Analysis of Large Data with Apache Spark and REnabling Exploratory Analysis of Large Data with Apache Spark and R
Enabling Exploratory Analysis of Large Data with Apache Spark and R
 
Apache Calcite (a tutorial given at BOSS '21)
Apache Calcite (a tutorial given at BOSS '21)Apache Calcite (a tutorial given at BOSS '21)
Apache Calcite (a tutorial given at BOSS '21)
 
AWS November Webinar Series - Advanced Analytics with Amazon Redshift and the...
AWS November Webinar Series - Advanced Analytics with Amazon Redshift and the...AWS November Webinar Series - Advanced Analytics with Amazon Redshift and the...
AWS November Webinar Series - Advanced Analytics with Amazon Redshift and the...
 
Big Data Web applications for Interactive Hadoop by ENRICO BERTI at Big Data...
 Big Data Web applications for Interactive Hadoop by ENRICO BERTI at Big Data... Big Data Web applications for Interactive Hadoop by ENRICO BERTI at Big Data...
Big Data Web applications for Interactive Hadoop by ENRICO BERTI at Big Data...
 
Enterprise Data Workflows with Cascading and Windows Azure HDInsight
Enterprise Data Workflows with Cascading and Windows Azure HDInsightEnterprise Data Workflows with Cascading and Windows Azure HDInsight
Enterprise Data Workflows with Cascading and Windows Azure HDInsight
 
ScalaTo July 2019 - No more struggles with Apache Spark workloads in production
ScalaTo July 2019 - No more struggles with Apache Spark workloads in productionScalaTo July 2019 - No more struggles with Apache Spark workloads in production
ScalaTo July 2019 - No more struggles with Apache Spark workloads in production
 
Full Stack Scala
Full Stack ScalaFull Stack Scala
Full Stack Scala
 
The openCypher Project - An Open Graph Query Language
The openCypher Project - An Open Graph Query LanguageThe openCypher Project - An Open Graph Query Language
The openCypher Project - An Open Graph Query Language
 
20170126 big data processing
20170126 big data processing20170126 big data processing
20170126 big data processing
 

More from DataWorks Summit/Hadoop Summit

Unleashing the Power of Apache Atlas with Apache Ranger
Unleashing the Power of Apache Atlas with Apache RangerUnleashing the Power of Apache Atlas with Apache Ranger
Unleashing the Power of Apache Atlas with Apache RangerDataWorks Summit/Hadoop Summit
 
Enabling Digital Diagnostics with a Data Science Platform
Enabling Digital Diagnostics with a Data Science PlatformEnabling Digital Diagnostics with a Data Science Platform
Enabling Digital Diagnostics with a Data Science PlatformDataWorks Summit/Hadoop Summit
 
Double Your Hadoop Performance with Hortonworks SmartSense
Double Your Hadoop Performance with Hortonworks SmartSenseDouble Your Hadoop Performance with Hortonworks SmartSense
Double Your Hadoop Performance with Hortonworks SmartSenseDataWorks Summit/Hadoop Summit
 
Building a Large-Scale, Adaptive Recommendation Engine with Apache Flink and ...
Building a Large-Scale, Adaptive Recommendation Engine with Apache Flink and ...Building a Large-Scale, Adaptive Recommendation Engine with Apache Flink and ...
Building a Large-Scale, Adaptive Recommendation Engine with Apache Flink and ...DataWorks Summit/Hadoop Summit
 
Real-Time Anomaly Detection using LSTM Auto-Encoders with Deep Learning4J on ...
Real-Time Anomaly Detection using LSTM Auto-Encoders with Deep Learning4J on ...Real-Time Anomaly Detection using LSTM Auto-Encoders with Deep Learning4J on ...
Real-Time Anomaly Detection using LSTM Auto-Encoders with Deep Learning4J on ...DataWorks Summit/Hadoop Summit
 
Mool - Automated Log Analysis using Data Science and ML
Mool - Automated Log Analysis using Data Science and MLMool - Automated Log Analysis using Data Science and ML
Mool - Automated Log Analysis using Data Science and MLDataWorks Summit/Hadoop Summit
 
The Challenge of Driving Business Value from the Analytics of Things (AOT)
The Challenge of Driving Business Value from the Analytics of Things (AOT)The Challenge of Driving Business Value from the Analytics of Things (AOT)
The Challenge of Driving Business Value from the Analytics of Things (AOT)DataWorks Summit/Hadoop Summit
 
From Regulatory Process Verification to Predictive Maintenance and Beyond wit...
From Regulatory Process Verification to Predictive Maintenance and Beyond wit...From Regulatory Process Verification to Predictive Maintenance and Beyond wit...
From Regulatory Process Verification to Predictive Maintenance and Beyond wit...DataWorks Summit/Hadoop Summit
 

More from DataWorks Summit/Hadoop Summit (20)

Running Apache Spark & Apache Zeppelin in Production
Running Apache Spark & Apache Zeppelin in ProductionRunning Apache Spark & Apache Zeppelin in Production
Running Apache Spark & Apache Zeppelin in Production
 
State of Security: Apache Spark & Apache Zeppelin
State of Security: Apache Spark & Apache ZeppelinState of Security: Apache Spark & Apache Zeppelin
State of Security: Apache Spark & Apache Zeppelin
 
Unleashing the Power of Apache Atlas with Apache Ranger
Unleashing the Power of Apache Atlas with Apache RangerUnleashing the Power of Apache Atlas with Apache Ranger
Unleashing the Power of Apache Atlas with Apache Ranger
 
Enabling Digital Diagnostics with a Data Science Platform
Enabling Digital Diagnostics with a Data Science PlatformEnabling Digital Diagnostics with a Data Science Platform
Enabling Digital Diagnostics with a Data Science Platform
 
Revolutionize Text Mining with Spark and Zeppelin
Revolutionize Text Mining with Spark and ZeppelinRevolutionize Text Mining with Spark and Zeppelin
Revolutionize Text Mining with Spark and Zeppelin
 
Double Your Hadoop Performance with Hortonworks SmartSense
Double Your Hadoop Performance with Hortonworks SmartSenseDouble Your Hadoop Performance with Hortonworks SmartSense
Double Your Hadoop Performance with Hortonworks SmartSense
 
Hadoop Crash Course
Hadoop Crash CourseHadoop Crash Course
Hadoop Crash Course
 
Data Science Crash Course
Data Science Crash CourseData Science Crash Course
Data Science Crash Course
 
Apache Spark Crash Course
Apache Spark Crash CourseApache Spark Crash Course
Apache Spark Crash Course
 
Dataflow with Apache NiFi
Dataflow with Apache NiFiDataflow with Apache NiFi
Dataflow with Apache NiFi
 
Schema Registry - Set you Data Free
Schema Registry - Set you Data FreeSchema Registry - Set you Data Free
Schema Registry - Set you Data Free
 
Building a Large-Scale, Adaptive Recommendation Engine with Apache Flink and ...
Building a Large-Scale, Adaptive Recommendation Engine with Apache Flink and ...Building a Large-Scale, Adaptive Recommendation Engine with Apache Flink and ...
Building a Large-Scale, Adaptive Recommendation Engine with Apache Flink and ...
 
Real-Time Anomaly Detection using LSTM Auto-Encoders with Deep Learning4J on ...
Real-Time Anomaly Detection using LSTM Auto-Encoders with Deep Learning4J on ...Real-Time Anomaly Detection using LSTM Auto-Encoders with Deep Learning4J on ...
Real-Time Anomaly Detection using LSTM Auto-Encoders with Deep Learning4J on ...
 
Mool - Automated Log Analysis using Data Science and ML
Mool - Automated Log Analysis using Data Science and MLMool - Automated Log Analysis using Data Science and ML
Mool - Automated Log Analysis using Data Science and ML
 
How Hadoop Makes the Natixis Pack More Efficient
How Hadoop Makes the Natixis Pack More Efficient How Hadoop Makes the Natixis Pack More Efficient
How Hadoop Makes the Natixis Pack More Efficient
 
HBase in Practice
HBase in Practice HBase in Practice
HBase in Practice
 
The Challenge of Driving Business Value from the Analytics of Things (AOT)
The Challenge of Driving Business Value from the Analytics of Things (AOT)The Challenge of Driving Business Value from the Analytics of Things (AOT)
The Challenge of Driving Business Value from the Analytics of Things (AOT)
 
Breaking the 1 Million OPS/SEC Barrier in HOPS Hadoop
Breaking the 1 Million OPS/SEC Barrier in HOPS HadoopBreaking the 1 Million OPS/SEC Barrier in HOPS Hadoop
Breaking the 1 Million OPS/SEC Barrier in HOPS Hadoop
 
From Regulatory Process Verification to Predictive Maintenance and Beyond wit...
From Regulatory Process Verification to Predictive Maintenance and Beyond wit...From Regulatory Process Verification to Predictive Maintenance and Beyond wit...
From Regulatory Process Verification to Predictive Maintenance and Beyond wit...
 
Backup and Disaster Recovery in Hadoop
Backup and Disaster Recovery in Hadoop Backup and Disaster Recovery in Hadoop
Backup and Disaster Recovery in Hadoop
 

Recently uploaded

Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 

Recently uploaded (20)

Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 

Polyalgebra

  • 1. © Hortonworks Inc. 2016 Polyalgebra Hadoop Summit, April 14, 2016
  • 2. © Hortonworks Inc. 2016 Julian Hyde @julianhyde Apache Calcite (VP), Drill, Kylin Mondrian OLAP Hortonworks Thanks: Jacques Nadeau @intjesus (Dremio/Drill) Wes McKinney (Cloudera/Arrow) Who Tomer Shiran @tshiran Apache Drill Dremio
  • 3. Page‹#› © Hortonworks Inc. 2014 © Hortonworks Inc. 2016 Polyalgebra An extended form of relational algebra that encompasses work with dynamically-typed data, complex records, streaming and machine learning that allows for a single optimization space.
  • 4. © Hortonworks Inc. 2016 Ecosystem Calcite Drill Arrow Ibis Impala Kudu Splunk Cassandra JDBC MongoDB JDBC Spark Flink
  • 5. © Hortonworks Inc. 2016 Ecosystem - data stores Calcite Drill Arrow Ibis Impala Kudu Splunk Cassandra JDBC MongoDB JDBC Spark Flink
  • 6. © Hortonworks Inc. 2016 Ecosystem - Engines Calcite Drill Arrow Ibis Impala Kudu Splunk Cassandra JDBC MongoDB JDBC Spark Flink
  • 7. © Hortonworks Inc. 2016 Ecosystem - Focus of this talk Calcite Drill Arrow Ibis Impala Kudu Splunk Cassandra JDBC MongoDB JDBC Spark Flink
  • 8. © Hortonworks Inc. 2016 HadoopRDBMS Old world, new world • Security • Metadata • SQL • Query planning • Data independence • Scale • Late schema • Choice of front-end • Choice of engines • Workload: batch, interactive, streaming, ML, graph, …
  • 9. © Hortonworks Inc. 2016 Many front ends, many engines SQL Planning Execution
 engine Planning User code Map
 Reduce Tez User code in Yarn Spark MongoDB Hadoop External
 SQL SQL Spark Storm Cascading HBase Graph
  • 10. © Hortonworks Inc. 2016 Extension to mathematical set theory Devised by E.F. Code (IBM) in 1970 Defines the relational database Operators: select, filter, join, sort, union, etc. Intermediate format for query planning/optimization Relational algebra SQL Relational algebra Runnable query plan Optimization
  • 11. © Hortonworks Inc. 2016 select d.name, COUNT(*) as c
 from Emps as e
 join Depts as d
 on e.deptno = d.deptno
 where e.age < 30
 group by d.deptno
 having count(*) > 5
 order by c desc Relational algebra Scan [Emps] Scan [Depts] Join [e.deptno
 = d.deptno] Filter [e.age < 30] Aggregate [deptno, COUNT(*) AS c] Filter [c > 5] Project [name, c] Sort [c DESC] (Column names are simplified. They would usually
 be ordinals, e.g. $0 is the first column of the left input.)
  • 12. © Hortonworks Inc. 2016 select * from (
 select zipcode, state
 from Emps
 union all
 select zipcode, state
 from Customers)
 where state in (‘CA’, ‘TX’) Relational algebra - Union and sub-query Scan [Emps] Scan [Customers] Union [all] Project [zipcode, state] Project [zipcode, state] Filter [state IN (‘CA’, ‘TX’)]
  • 13. © Hortonworks Inc. 2016 insert into Facts
 values (‘Meaning of life’, 42),
 (‘Clever as clever’, 6) Relational algebra - Insert and Values Insert [Facts] Values [[‘Meaning of life’, 42], [‘Clever as clever’, 6]]
  • 14. © Hortonworks Inc. 2016 MySQL Splunk Expression tree
 select p.productName, COUNT(*) as c
 from splunk.splunk as s
 join mysql.products as p
 on s.productId = p.productId
 where s.action = 'purchase'
 group by p.productName
 order by c desc join Key: product_id group Key: product_name
 Agg: count filter Condition:
 action =
 'purchase' sort Key: c DESC scan scan Table: splunk Table: products
  • 15. © Hortonworks Inc. 2016 Splunk Expression tree
 (optimized) join Key: product_id group Key: product_name
 Agg: count filter Condition:
 action =
 'purchase' sort Key: c DESC scan Table: splunk MySQL scan Table: products select p.productName, COUNT(*) as c
 from splunk.splunk as s
 join mysql.products as p
 on s.productId = p.productId
 where s.action = 'purchase'
 group by p.productName
 order by c desc
  • 16. Page‹#› © Hortonworks Inc. 2014 © Hortonworks Inc. 2016 Demo {sqlline, apache-calcite, .csv, CsvPushProjectOntoTableRule}
  • 17. © Hortonworks Inc. 2016 Calcite – APIs and SPIs Cost, statistics RelOptCost RelOptCostFactory RelMetadataProvider • RelMdColumnUniquensss • RelMdDistinctRowCount • RelMdSelectivity SQL parser SqlNode
 SqlParser
 SqlValidator Transformation rules RelOptRule • MergeFilterRule • PushAggregateThroughUnionRule • 100+ more Global transformations • Unification (materialized view) • Column trimming • De-correlation Relational algebra RelNode (operator) • TableScan • Filter • Project • Union • Aggregate • … RelDataType (type) RexNode (expression) RelTrait (physical property) • RelConvention (calling-convention) • RelCollation (sortedness) • TBD (bucketedness/distribution) JDBC driver Metadata Schema Table Function • TableFunction • TableMacro Lattice
  • 18. © Hortonworks Inc. 2016 Calcite Planning Process SQL parse tree Planner RelNode Graph Sql-to-Rel Converter SqlNode ! RelNode + RexNode • Node for each node in Input Plan • Each node is a Set of alternate Sub Plans • Set further divided into Subsets: based on traits like sortedness 1. Plan Graph • Rule: specifies an Operator sub-graph to match and logic to generate equivalent ‘better’ sub-graph • New and original sub-graph both remain in contention 2. Rules • RelNodes have Cost & Cumulative Cost 3. Cost Model - Used to plug in Schema, cost formulas - Filter selectivity - Join selectivity - NDV calculations 4. Metadata Providers Rule Match Queue - Add Rule matches to Queue - Apply Rule match transformations to plan graph - Iterate for fixed iterations or until cost doesn’t change - Match importance based on cost of RelNode and height Best RelNode Graph Translate to runtime Logical Plan Based on “Volcano” & “Cascades” papers [G. Graefe]
  • 19. © Hortonworks Inc. 2016 Algebra builder API produces final FrameworkConfig config; final RelBuilder builder = RelBuilder.create(config); final RelNode node = builder .scan("EMP") .aggregate(builder.groupKey("DEPTNO"), builder.count(false, "C"), builder.sum(false, "S", builder.field("SAL"))) .filter( builder.call(SqlStdOperatorTable.GREATER_THAN, builder.field("C"), builder.literal(10))) .build(); System.out.println(RelOptUtil.toString(node)); select deptno,
 COUNT(*) as c, sum(sal) as s
 from Emp
 having COUNT(*) > 10 LogicalFilter(condition=[>($1, 10)]) LogicalAggregate(group=[{7}], C=[COUNT()], S=[SUM($5)]) LogicalTableScan(table=[[scott, EMP]]) Equivalent SQL:
  • 20. © Hortonworks Inc. 2016 Non-relational, post-relational Non-relational stores: • Document databases — MongoDB • Key-value stores — HBase, Cassandra • Graph databases — Neo4J • Multidimensional OLAP — Microsoft Analysis, Mondrian • Streams — Kafka, Storm • Text, audio, video Non-relational operators — data exploration, machine learning Late or no schema
  • 21. © Hortonworks Inc. 2016 Complex data, also known as nested or document-oriented data. Typically, it can be represented as JSON.
 
 2 new operators are sufficient: • UNNEST • COLLECT aggregate function Complex data employees: [ { name: “Bob”, age: 48, pets: [ {name: “Jim”, type: “Dog”}, {name: “Frank”, type: “Cat”} ] }, { name: “Stacy", age: 31,
 starSign: ‘taurus’, pets: [ {name: “Jack”, type: “Cat”} ] }, { name: “Ken”, age: 23 } ]
  • 22. © Hortonworks Inc. 2016 Flatten converts arrays of values to separate rows: • New record for each list item • Empty lists removes record Flatten is actually just syntactic sugar for the UNNEST relational operator: UNNEST and Flatten name age pets Bob 48 [{name: Jim, type: dog}, {name:Frank, type: dog}] Stacy 31 [{name: Jack, type: cat}] Ken 23 [] name age pet Bob 48 {name: Jim, type: dog} Bob 48 {name: Frank, type: dog} Stacy 31 {name: Jack, type: cat} select e.name, e.age,
 flatten(e.pet)
 from Employees as e select e.name, e.age,
 row(a.name, a.type)
 from Employees as e, 
 unnest e.addresses as a
  • 23. © Hortonworks Inc. 2016 Optimizing UNNEST As usual, to optimize, we write planner rules. We can push filters into the non-nested side, so we write FilterUnnestTransposeRule. (There are many other possible rules.) select e.name, a.name
 from Employees as e, 
 unnest e.pets as a where e.age < 30 select e.name, a.street
 from (
 select *
 from Employees 
 where e.age < 30) as e, unnest e.addresses as a FilterUnnestTransposeRule
  • 24. © Hortonworks Inc. 2016 Optimizing UNNEST (2) We can also optimize projects. If table is stored in a column-oriented file format, this reduces disk reads significantly. • Array wildcard projection through flatten • Non-flattened column inclusion select e.name,
 flatten(pets).name
 from Employees as e scan(name, age, pets) flatten(pets) as pet project(name, pet.name) scan(name, pets[*].name) flatten(pets) as pet scan(name, age, pets) flatten(pets as pet) project(name, pets[*].name) Original Plan Project through Flatten Project into scan (less data read) ProjectFlattenTransposeRule ProjectScanRule
  • 25. © Hortonworks Inc. 2016 Evolution: • Oracle: Schema before write, strongly typed SQL (like Java) • Hive: Schema before query, strongly typed SQL • Drill: Schema on data, weakly typed SQL (like JavaScript) Late schema name age starSign pets Bob 48 [{name: Jim, type: dog}, {name:Frank, type: dog}] Stacy 31 Taurus [{name: Jack, type: cat}] Ken 23 [] name age pets Ken 23 [] select *
 from Employees select *
 from Employees where age < 30 no starSign column!
  • 26. © Hortonworks Inc. 2016 Expanding * • Early schema databases expand * at planning time, based on schema • Drill expands * during query execution • Each operator needs to be able to propagate column names/types as well as data Internally, Drill is strongly typed • Strong typing means efficient code • JavaScript engines do this too • Infer type for each batch of records • Throw away generated code if a column changes type in the next batch of records Implementing schema-on-data select e.name
 from Employees where e.age < 30 select e._map[“name”] as name
 from Employees where cast(e._map[“age”] as integer) < 30
  • 27. © Hortonworks Inc. 2016 A table function is a Java UDF that returns a relation. • Its arguments may be relations or scalars. • It appears in the execution plan. • Annotations indicate whether it is safe to push filters, project through A table macro is a Java function that takes a parse tree and returns a parse tree. • Named after Lisp macros. • It does not appear in the execution plan. • Views (next slide) are a kind of table macro. Use a table macro rather than a table function, if possible. Re-use existing optimizations. User-defined operators select e.name
 from table( my_sample( select * from Employees, 0.15)) select e.name
 from table( my_filter( select * from Employees, ‘age’, ‘<‘, 30))
  • 28. © Hortonworks Inc. 2016 Views Scan [Emps] Join [$0, $5] Project [$0, $1, $2, $3] Filter [age >= 50] Aggregate [deptno, min(salary)] Scan [Managers] Aggregate [manager] Scan [Emps] select deptno, min(salary)
 from Managers where age >= 50 group by deptno create view Managers as select * from Emps as e where exists ( select * from Emps as underling where underling.manager = e.id)
  • 29. © Hortonworks Inc. 2016 Views (after expansion) select deptno, min(salary)
 from Managers where age >= 50 group by deptno create view Managers as select * from Emps as e where exists ( select * from Emps as underling where underling.manager = e.id) Scan [Emps] Aggregate [manager] Join [$0, $5] Project [$0, $1, $2, $3] Filter [age >= 50] Aggregate [deptno, min(salary)] Scan [Emps]
  • 30. © Hortonworks Inc. 2016 Views (after pushing down filter) select deptno, min(salary)
 from Managers where age >= 50 group by deptno create view Managers as select * from Emps as e where exists ( select * from Emps as underling where underling.manager = e.id) Scan [Emps] Scan [Emps] Join [$0, $5] Project [$0, $1, $2, $3] Filter [age >= 50] Aggregate [deptno, min(salary)]
  • 31. © Hortonworks Inc. 2016 Materialized view create materialized view
 EmpSummary as
 select deptno,
 gender,
 count(*) as c, 
 sum(sal)
 from Emps group by deptno, gender select count(*) as c
 from Emps where deptno = 10 and gender = ‘M’ Scan [Emps] Aggregate [deptno, gender,
 COUNT(*), SUM(sal)] Scan [EmpSummary] = Scan [Emps] Filter [deptno = 10 AND gender = ‘M’] Aggregate [COUNT(*)]
  • 32. © Hortonworks Inc. 2016 Materialized view, step 2: Rewrite query to match create materialized view
 EmpSummary as
 select deptno,
 gender,
 count(*) as c, 
 sum(sal)
 from Emps group by deptno, gender select count(*) as c
 from Emps where deptno = 10 and gender = ‘M’ Scan [Emps] Aggregate [deptno, gender,
 COUNT(*), SUM(sal)] Scan [EmpSummary] = Scan [Emps] Filter [deptno = 10 AND gender = ‘M’] Aggregate [deptno, gender,
 COUNT(*) AS c, SUM(sal) AS s] Project [c]
  • 33. © Hortonworks Inc. 2016 Materialized view, step 3: substitute table create materialized view
 EmpSummary as
 select deptno,
 gender,
 count(*) as c, 
 sum(sal)
 from Emps group by deptno, gender select count(*) as c
 from Emps where deptno = 10 and gender = ‘M’ Scan [Emps] Aggregate [deptno, gender,
 COUNT(*), SUM(sal)] Scan [EmpSummary] = Filter [deptno = 10 AND gender = ‘M’] Project [c] Scan [EmpSummary]
  • 34. © Hortonworks Inc. 2016 Streaming queries run forever. Stream appears in the FROM clause: Orders. Without the stream keyword, Orders means the history of the stream (a table). Calcite streaming SQL: in Samza, Storm, Flink. Streaming queries select stream *
 from Orders select *
 from Orders
  • 35. © Hortonworks Inc. 2016 • Orders is used as both stream and table • System determines where to find the records • Query is invalid if records are not available Combining past and future select stream *
 from Orders as o
 where units > ( 
 select avg(units)
 from Orders as h
 where h.productId = o.productId
 and h.rowtime >
 o.rowtime - interval ‘1’ year)
  • 36. © Hortonworks Inc. 2016 Hybrid systems combine more than one data source and/or engine. Examples: • Splunk join to MySQL • User-defined table written in Python reading from an in-memory temporary table just created by Drill. • Streaming query populating a table summarizing the last hour’s activity that will be used to populate a pie chart in a web dashboard. Two challenges: • Planning the query to take advantage of each system’s strengths. • Efficient interchange of data at run time. Hybrid systems
  • 37. © Hortonworks Inc. 2016 Hybrid algebra, hybrid run-time Calcite Drill Arrow Ibis Impala Kudu Splunk Cassandra JDBC MongoDB JDBC Spark Flink
  • 38. DREMIO© Hortonworks Inc. 2016 Arrow in a Slide • New Top-level Apache Software Foundation project – Announced Feb 17, 2016 • Focused on Columnar In-Memory Analytics 1. 10-100x speedup on many workloads 2. Common data layer enables companies to choose best of breed systems 3. Designed to work with any programming language 4. Support for both relational and complex data as-is • Developers from 13+ major open source projects involved – A significant % of the world’s data will be processed through Arrow! Calcite Cassandra Deeplearning4j Drill Hadoop HBase Ibis Impala Kudu Pandas Parquet Phoenix Spark Storm R
  • 39. DREMIO© Hortonworks Inc. 2016 Focus on CPU Efficiency Traditional Memory Buffer Arrow Memory Buffer • Cache Locality • Super-scalar & vectorized operation • Minimal Structure Overhead • Constant value access – With minimal structure overhead • Operate directly on columnar compressed data
  • 40. DREMIO© Hortonworks Inc. 2016 High Performance Sharing & Interchange Today With Arrow • Each system has its own internal memory format • 70-80% CPU wasted on serialization and deserialization • Similar functionality implemented in multiple projects • All systems utilize the same memory format • No overhead for cross-system communication • Projects can share functionality (eg, Parquet-to-Arrow reader)
  • 41. © Hortonworks Inc. 2016 • Algebra-centric approach • Optimize by applying transformation rules • User-defined operators (table functions, table macros, custom RelNode classes) • Complex data • Late-schema queries • Streaming queries • Calcite enables planning hybrid queries • Arrow enables hybrid runtime Summary
  • 42. © Hortonworks Inc. 2016 @julianhyde @tshiran @ApacheCalcite @ApacheDrill @ApacheArrow Get involved: • http://calcite.apache.org • http://drill.apache.org • http://arrow.apache.org Thanks!