SlideShare a Scribd company logo
V5	
  
The	
  Evolu*on	
  of	
  a	
  Rela*onal	
  Database	
  Layer	
  over	
  HBase	
  
@ApachePhoenix	
  
h0p://phoenix.apache.org	
  
2015-­‐09-­‐29	
  
Nick	
  Dimiduk	
  (@xefyr)	
  
h0p://n10k.com	
  
#apachebigdata	
  
Agenda	
  
o  What	
  is	
  Apache	
  Phoenix?	
  
o  State	
  of	
  the	
  Union	
  
o  Latest	
  Releases	
  
o  A	
  brief	
  aside	
  on	
  TransacQons	
  
o  What’s	
  Next?	
  
o  Q	
  &	
  A	
  
WHAT	
  IS	
  APACHE	
  PHOENIX	
  
PuUng	
  the	
  SQL	
  back	
  into	
  NoSQL	
  
What	
  is	
  Apache	
  Phoenix?	
  
o  A	
  relaQonal	
  database	
  layer	
  for	
  Apache	
  HBase	
  
o  Query	
  engine	
  
o  Transforms	
  SQL	
  queries	
  into	
  naQve	
  HBase	
  API	
  calls	
  
o  Pushes	
   as	
   much	
   work	
   as	
   possible	
   onto	
   the	
   cluster	
   for	
   parallel	
  
execuQon	
  
o  Metadata	
  repository	
  
o  Typed	
  access	
  to	
  data	
  stored	
  in	
  HBase	
  tables	
  
o  A	
  JDBC	
  driver	
  
o  A	
  top	
  level	
  Apache	
  So_ware	
  FoundaQon	
  project	
  
o  Originally	
  developed	
  at	
  Salesforce	
  
o  A	
  growing	
  community	
  with	
  momentum	
  
What	
  is	
  Apache	
  Phoenix?	
  
==	
  
==	
  
Where	
  Does	
  Phoenix	
  Fit	
  In?	
  Sqoop	
  	
  
RDB	
  Data	
  Collector	
  
Flume	
  	
  
Log	
  Data	
  Collector	
  
Zookeeper	
  
CoordinaQon	
  
YARN	
  /	
  MRv2	
  
Cluster	
  Resource	
  
Manager	
  /	
  
MapReduce	
  
HDFS	
  
Hadoop	
  Distributed	
  File	
  System	
  
GraphX	
  
Graph	
  analysis	
  
framework	
  
Phoenix	
  
Query	
  execuQon	
  engine	
  
HBase	
  
Distributed	
  Database	
  
The	
  Java	
  Virtual	
  Machine	
  
Hadoop	
  
Common	
  JNI	
  
Spark	
  
IteraQve	
  In-­‐Memory	
  
ComputaQon	
  
MLLib	
  
Data	
  mining	
  
Pig	
  
Data	
  ManipulaQon	
  
Hive	
  
Structured	
  Query	
  
Phoenix	
  
JDBC	
  client	
  
Phoenix	
  Puts	
  the	
  SQL	
  Back	
  in	
  NoSQL	
  
o  Familiar	
  SQL	
  interface	
  for	
  (DDL,	
  DML,	
  etc.)	
  
o Read	
  only	
  views	
  on	
  exisQng	
  HBase	
  data	
  
o Dynamic	
  columns	
  extend	
  schema	
  at	
  runQme	
  
o Flashback	
  queries	
  using	
  versioned	
  schema	
  
o  Data	
  types	
  
o  Secondary	
  indexes	
  
o  Joins	
  
o  Query	
  planning	
  and	
  opQmizaQon	
  
o  MulQ-­‐tenancy	
  
Phoenix	
  Puts	
  the	
  SQL	
  Back	
  in	
  NoSQL	
  
Accessing	
  HBase	
  data	
  with	
  Phoenix	
  can	
  be	
  substanQally	
  easier	
  than	
  direct	
  
HBase	
  API	
  use	
  
	
  
	
  
Versus	
  
	
  
HTable t = new HTable(“foo”);
RegionScanner s = t.getScanner(new Scan(…,
new ValueFilter(CompareOp.GT,
new CustomTypedComparator(30)), …));
while ((Result r = s.next()) != null) {
// blah blah blah Java Java Java
}
s.close();
t.close();
SELECT * FROM foo WHERE bar > 30
HTable t = new HTable(“foo”);
RegionScanner s = t.getScanner(new Scan(…,
new ValueFilter(CompareOp.GT,
new CustomTypedComparator(30)), …));
while ((Result r = s.next()) != null) {
// blah blah blah Java Java Java
}
s.close();
t.close();
Your	
  BI	
  tool	
  
probably	
  can’t	
  do	
  
this	
  
(And	
  we	
  didn’t	
  include	
  error	
  handling…)	
  
STATE	
  OF	
  THE	
  UNION	
  
So	
  how’s	
  things?	
  
And	
  more	
  ….	
  
State	
  of	
  the	
  Union	
  
o  SQL	
  Support:	
  Broad	
  enough	
  to	
  run	
  TPC	
  queries	
  
o  Joins,	
  Sub-­‐queries,	
  Derived	
  tables,	
  etc.	
  
o  Secondary	
  Indices:	
  Three	
  different	
  strategies	
  
o  Immutable	
  for	
  write-­‐once/append	
  only	
  data	
  	
  
o  Global	
  for	
  read-­‐heavy	
  mutable	
  data	
  
o  Local	
  for	
  write-­‐heavy	
  mutable	
  or	
  immutable	
  data	
  
o  StaQsQcs	
  driven	
  parallel	
  execuQon	
  
o  Monitoring	
  &	
  Management	
  
o  Tracing,	
  metrics	
  
Join	
  and	
  Subquery	
  Support
o Grammar	
  
o inner	
  join;	
  le_/right/full	
  outer	
  join;	
  cross	
  join	
  
o AddiQonal	
  
o semi	
  join;	
  anQ	
  join	
  
o Algorithms	
  
o hash-­‐join;	
  sort-­‐merge-­‐join	
  
o OpQmizaQons	
  
o Predicate	
  push-­‐down;	
  FK-­‐to-­‐PK	
  join	
  opQmizaQon;	
  
Global	
  index	
  with	
  missing	
  data	
  columns;	
  Correlated	
  
subquery	
  rewrite	
  
TPC	
  Example	
  1	
  
Small-­‐QuanQty-­‐Order	
  Revenue	
  Query	
  (Q17)
select sum(l_extendedprice) / 7.0 as avg_yearly
from lineitem, part
where p_partkey = l_partkey
and p_brand = '[B]'
and p_container = '[C]'
and l_quantity < (
select 0.2 * avg(l_quantity)
from lineitem
where l_partkey = p_partkey
);
CLIENT 4-WAY FULL SCAN OVER lineitem
PARALLEL INNER JOIN TABLE 0
CLIENT 1-WAY FULL SCAN OVER part
SERVER FILTER BY p_partkey = ‘[B]’ AND p_container = ‘[C]’
PARALLEL INNER JOIN TABLE 1
CLIENT 4-WAY FULL SCAN OVER lineitem
SERVER AGGREGATE INTO DISTINCT ROWS BY l_partkey
AFTER-JOIN SERVER FILTER BY l_quantity < $0
TPC	
  Example	
  2	
  
Order	
  Priority	
  Checking	
  Query	
  (Q4)
select o_orderpriority, count(*) as order_count
from orders
where o_orderdate >= date '[D]'
and o_orderdate < date '[D]' + interval '3' month
and exists (
select * from lineitem
where l_orderkey = o_orderkey and l_commitdate < l_receiptdate
)
group by o_orderpriority
order by o_orderpriority;
CLIENT 4-WAY FULL SCAN OVER orders
SERVER FILTER o_orderdate >= ‘[D]’ AND o_orderdate < ‘[D]’ + 3(d)
SERVER AGGREGATE INTO ORDERED DISTINCT ROWS BY o_orderpriority
CLIENT MERGE SORT
SKIP-SCAN JOIN TABLE 0
CLIENT 4-WAY FULL SCAN OVER lineitem
SERVER FILTER BY l_commitdate < l_receiptdate
DYNAMIC SERVER FILTER BY o_orderkey IN l_orderkey
Join	
  support	
  -­‐	
  what	
  can't	
  we	
  do?
o Nested	
  Loop	
  Join	
  
o StaQsQcs	
  Guided	
  Join	
  Algorithm	
  
o Smartly	
  choose	
  the	
  smaller	
  table	
  for	
  the	
  build	
  side	
  
o Smartly	
  switch	
  between	
  hash-­‐join	
  and	
  sort-­‐merge-­‐join	
  
o Smartly	
  turn	
  on/off	
  FK-­‐to-­‐PK	
  join	
  opQmizaQon
LATEST	
  RELEASES	
  
The	
  new	
  goodness,	
  from	
  our	
  community	
  to	
  your	
  datacenter!	
  
Phoenix	
  4.4	
  
o  HBase	
  1.0	
  Support	
  
o  Func*onal	
  Indexes	
  
o  User	
  Defined	
  Func*ons	
  
o  Query	
  Server	
  with	
  Thin	
  Driver	
  
o  Union	
  All	
  support	
  
o  TesQng	
  at	
  scale	
  with	
  Pherf	
  
o  MR	
  index	
  build	
  
o  Spark	
  integraQon	
  
o  Date	
  built-­‐in	
  funcQons	
  –	
  WEEK,	
  DAYOFMONTH,	
  etc.	
  
Phoenix	
  4.4:	
  FuncQonal	
  Indexes	
  
o CreaQng	
  an	
  index	
  on	
  an	
  expression	
  as	
  
opposed	
  to	
  just	
  a	
  column	
  value.	
  
o Example	
  without	
  index,	
  full	
  table	
  scan:	
  
SELECT	
  AVG(response_*me)	
  FROM	
  SERVER_METRICS	
  
WHERE	
  DAYOFMONTH(create_*me)	
  =	
  1	
  
o Add	
  funcQonal	
  index,	
  range	
  scan:	
  
CREATE	
  INDEX	
  day_of_month_idx	
  
ON	
  SERVER_METRICS	
  (DAYOFMONTH(create_*me))	
  
INCLUDE	
  (response_*me)	
  
Phoenix	
  4.4:	
  User	
  Defined	
  FuncQons	
  
o  Extension	
  points	
  to	
  Phoenix	
  for	
  domain-­‐specific	
  
funcQons.	
  
o  For	
  example,	
  a	
  geo-­‐locaQon	
  applicaQon	
  might	
  load	
  a	
  
set	
  of	
  UDFs	
  like	
  this:	
  
CREATE	
  FUNCTION	
  WOEID_DISTANCE(INTEGER,INTEGER)	
  	
  
RETURNS	
  INTEGER	
  AS	
  ‘org.apache.geo.woeidDistance’	
  
USING	
  JAR	
  ‘/lib/geo/geoloc.jar’	
  
o  Querying,	
  funcQonal	
  indexing,	
  etc.	
  then	
  possible:	
  
SELECT	
  *	
  FROM	
  woeid	
  a	
  JOIN	
  woeid	
  b	
  ON	
  a.country	
  =	
  b.country	
  
WHERE	
  woeid_distance(a.ID,b.ID)	
  <	
  5	
  
Phoenix	
  4.4:	
  Query	
  Server	
  +	
  Thin	
  Driver	
  
o  Offloads	
  query	
  planning	
  and	
  execuQon	
  to	
  different	
  
server(s)	
  
o  Minimizes	
  client	
  dependencies	
  
o  Enabler	
  for	
  ODBC	
  driver	
  (work	
  in	
  progress)	
  
o  Connect	
  like	
  this	
  instead:	
  
Connection conn = DriverManager.getConnection(
"jdbc:phoenix:thin:url=http://localhost:8765");
o  SQll	
  evolving:	
  no	
  backward	
  compa*bility	
  guarantees	
  yet	
  
	
  
h0p://phoenix.apache.org/server.html	
  
Phoenix	
  4.4	
  
o  HBase	
  1.0	
  Support	
  
o  FuncQonal	
  Indexes	
  
o  User	
  Defined	
  FuncQons	
  
o  Query	
  Server	
  with	
  Thin	
  Driver	
  
o  Union	
  All	
  support	
  
o  Tes*ng	
  at	
  scale	
  with	
  Pherf	
  
o  MR	
  index	
  build	
  
o  Spark	
  integra*on	
  
o  Date	
  built-­‐in	
  func*ons	
  –	
  WEEK,	
  DAYOFMONTH,	
  &c.	
  
	
  
Phoenix	
  4.5	
  
o  HBase	
  1.1	
  Support	
  
o  Client-­‐side	
  per-­‐statement	
  metrics	
  
o  SELECT	
  without	
  FROM	
  
o  Now	
  possible	
  to	
  alter	
  tables	
  with	
  views	
  
o  Math	
  built-­‐in	
  funcQons	
  –	
  SIGN,	
  SQRT,	
  CBRT,	
  EXP,	
  &c.	
  
o  Array	
  built-­‐in	
  funcQons	
  –	
  ARRAY_CAT,	
  ARRAY_FILL,	
  
&c.	
  
o  UDF,	
  View,	
  FuncQonal	
  Index	
  enhancements	
  
o  Pherf	
  and	
  Performance	
  enhancements	
  
TRANSACTIONS	
  
I	
  was	
  told	
  there	
  would	
  be…	
  
TransacQons	
  (Work	
  in	
  Progress)	
  
o  Snapshot	
  isolaQon	
  model	
  
o  Using	
  Tephra	
  (h0p://tephra.io/)	
  
o  Supports	
  REPEATABLE_READ	
  isolaQon	
  level	
  
o  Allows	
  reading	
  your	
  own	
  uncommi0ed	
  data	
  
o  OpQonal	
  
o  Enabled	
  on	
  a	
  table	
  by	
  table	
  basis	
  
o  No	
  performance	
  penalty	
  when	
  not	
  used	
  
o  Work	
  in	
  progress,	
  but	
  close	
  to	
  release	
  
o  Try	
  our	
  txn	
  branch	
  
o  Will	
  be	
  available	
  in	
  next	
  release	
  
OpQmisQc	
  Concurrency	
  Control	
  
•  Avoids cost of locking rows and tables
•  No deadlocks or lock escalations
•  Cost of conflict detection and possible rollback is higher
•  Good if conflicts are rare: short transaction, disjoint
partitioning of work
•  Conflict detection not always necessary: write-once/
append-only data
Tephra	
  Architecture	
  
ZooKeeper	

Tx Manager	

(standby)	

HBase	

Master 1	

Master 2 	

	

RS 1	

RS 2	

 RS 4	

RS 3	

Client 1	

Client 2	

Client N	

Tx Manager	

(active)
time out
try abort
failed
roll back
in HBase
write
to
HBase
do work
Client Tx Manager
none
complete V
abortsucceeded
in progress
start tx
start
start tx
commit
try commit check conflicts
invalid X
invalidate
failed
TransacQon	
  Lifecycle	
  
Tephra	
  Architecture	
  
•  TransactionAware client!
•  Coordinates transaction lifecycle with manager
•  Communicates directly with HBase for reads and writes
•  Transaction Manager
•  Assigns transaction IDs
•  Maintains state on in-progress, committed and invalid transactions!
•  Transaction Processor coprocessor
•  Applies server-side filtering for reads
•  Cleans up data from failed transactions, and no longer visible versions
WHAT’S	
  NEXT?	
  
A	
  brave	
  new	
  world	
  
What’s	
  Next?	
  
o Is	
  Phoenix	
  done?	
  
o What	
  about	
  the	
  Big	
  Picture?	
  
o How	
  can	
  Phoenix	
  be	
  leveraged	
  in	
  the	
  larger	
  
ecosystem?	
  
o Hive,	
  Pig,	
  MR	
  integraQon	
  with	
  Phoenix	
  today,	
  but	
  
it’s	
  not	
  a	
  great	
  story	
  
What’s	
  Next?	
  
You	
  are	
  here	
  
Moving	
  to	
  Apache	
  Calcite	
  
o  Query	
  parser,	
  compiler,	
  and	
  planner	
  framework	
  
o SQL-­‐92	
  compliant	
  (ever	
  argue	
  SQL	
  with	
  Julian?	
  :-­‐)	
  )	
  
o Enables	
  Phoenix	
  to	
  get	
  missing	
  SQL	
  support	
  
o  Pluggable	
  cost-­‐based	
  opQmizer	
  framework	
  
o Sane	
  way	
  to	
  model	
  push	
  down	
  through	
  rules	
  
o  Interop	
  with	
  other	
  Calcite	
  adaptors	
  
o Not	
  for	
  free,	
  but	
  it	
  becomes	
  feasible	
  
o Already	
  used	
  by	
  Drill,	
  Hive,	
  Kylin,	
  Samza	
  
o Supports	
  any	
  JDBC	
  source	
  (i.e.	
  RDBMS	
  -­‐	
  remember	
  
them	
  :-­‐)	
  )	
  
o One	
  cost-­‐model	
  to	
  rule	
  them	
  all	
  
How	
  does	
  Phoenix	
  plug	
  in?	
  
Calcite	
  Parser	
  &	
  Validator
Calcite	
  Query	
  OpQmizer
Phoenix	
  Query	
  Plan	
  Generator
Phoenix	
  RunQme
Phoenix	
  Tables	
  over	
  HBase	
  
JDBC	
  Client
SQL	
  +	
  Phoenix	
  
specific	
  
grammar
Built-­‐in	
  rules	
  
+	
  Phoenix	
  
specific	
  rules
OpQmizaQon	
  Rules	
  
o AggregateRemoveRule	
  
o FilterAggregateTransposeRule	
  
o FilterJoinRule	
  
o FilterMergeRule	
  
o JoinCommuteRule	
  
o PhoenixFilterScanMergeRule	
  
o PhoenixJoinSingleAggregateMergeRule	
  
o …	
  
Query	
  Example	
  	
  
(filter	
  push-­‐down	
  and	
  smart	
  join	
  algorithm)	
  
LogicalFilter	
  
filter:	
  $0	
  =	
  ‘x’
LogicalJoin	
  
type:	
  inner	
  
cond:	
  $3	
  =	
  $7
LogicalProject	
  
projects:	
  $0,	
  $5
LogicalTableScan	
  
table:	
  A
LogicalTableScan	
  
table:	
  B
PhoenixTableScan	
  
table:	
  ‘a’	
  
filter:	
  $0	
  =	
  ‘x’	
  
PhoenixServerJoin	
  
type:	
  inner	
  
cond:	
  $3	
  =	
  $1
PhoenixServerProject	
  
projects:	
  $2,	
  $0
OpQmizer	
  
(with	
  
RelOptRules	
  &	
  
ConvertRules)	
  
PhoenixTableScan	
  
table:	
  ‘b’	
  
PhoenixServerProject	
  
projects:	
  $0,	
  $2
PhoenixServerProject	
  
projects:	
  $0,	
  $3
Query	
  Example	
  
(filter	
  push-­‐down	
  and	
  smart	
  join	
  algorithm)
ScanPlan	
  
table:	
  ‘a’	
  
skip-­‐scan:	
  pk0	
  =	
  ‘x’	
  
projects:	
  pk0,	
  c3
HashJoinPlan	
  
types	
  {inner}
join-­‐keys:	
  {$1}
projects:	
  $2,	
  $0
Build	
  
hash-­‐key:	
  $1
Phoenix	
  
Implementor	
  
PhoenixTableScan	
  
table:	
  ‘a’	
  
filter:	
  $0	
  =	
  ‘x’	
  
PhoenixServerJoin	
  
type:	
  inner	
  
cond:	
  $3	
  =	
  $1
PhoenixServerProject	
  
projects:	
  $2,	
  $0
PhoenixTableScan	
  
table:	
  ‘b’	
  
PhoenixServerProject	
  
projects:	
  $0,	
  $2
PhoenixServerProject	
  
projects:	
  $0,	
  $3
ScanPlan	
  
table:	
  ‘b’	
  
projects:	
  col0,	
  col2	
  
Probe
Interoperability	
  Example	
  
o Joining	
  data	
  from	
  Phoenix	
  and	
  mySQL	
  
EnumerableJoin
PhoenixTableScan JdbcTableScan
Phoenix	
  Tables	
  over	
  HBase	
   mySQL	
  Database	
  
PhoenixToEnumerable	
  
Converter
JdbcToEnumerable	
  
Converter
Query	
  Example	
  1
WITH	
  m	
  AS	
  	
  
	
  	
  	
  	
  (SELECT	
  *	
  	
  
	
  	
  	
  	
  	
  FROM	
  dept_manager	
  dm	
  	
  
	
  	
  	
  	
  	
  WHERE	
  from_date	
  =	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  (SELECT	
  max(from_date)	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  FROM	
  dept_manager	
  dm2	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  WHERE	
  dm.dept_no	
  =	
  dm2.dept_no))	
  	
  
SELECT	
  m.dept_no,	
  d.dept_name,	
  e.first_name,	
  e.last_name	
  	
  
FROM	
  employees	
  e	
  	
  
JOIN	
  m	
  ON	
  e.emp_no	
  =	
  m.emp_no	
  
JOIN	
  departments	
  d	
  ON	
  d.dept_no	
  =	
  m.dept_no	
  
ORDER	
  BY	
  d.dept_no;
Query	
  Example	
  2	
  
SELECT	
  dept_no,	
  Qtle,	
  count(*)	
  	
  
FROM	
  Qtles	
  t	
  	
  
JOIN	
  dept_emp	
  de	
  ON	
  t.emp_no	
  =	
  de.emp_no	
  
WHERE	
  dept_no	
  <=	
  'd006'	
  
GROUP	
  BY	
  rollup(dept_no,	
  *tle)	
  	
  
ORDER	
  BY	
  dept_no,	
  Qtle;	
  
V5	
  
Thanks!	
  
@ApachePhoenix	
  
h0p://phoenix.apache.org	
  
2015-­‐09-­‐29	
  
Nick	
  Dimiduk	
  (@xefyr)	
  
h0p://n10k.com	
  
#apachebigdata	
  

More Related Content

PPTX
Apache Phoenix: Transforming HBase into a SQL Database
PPTX
The Evolution of a Relational Database Layer over HBase
PDF
Apache Big Data EU 2015 - HBase
PPTX
Apache phoenix: Past, Present and Future of SQL over HBAse
PPTX
Apache Phoenix and HBase: Past, Present and Future of SQL over HBase
PPTX
Apache phoenix
PPTX
HBaseConEast2016: HBase and Spark, State of the Art
PPTX
Apache Phoenix: Use Cases and New Features
Apache Phoenix: Transforming HBase into a SQL Database
The Evolution of a Relational Database Layer over HBase
Apache Big Data EU 2015 - HBase
Apache phoenix: Past, Present and Future of SQL over HBAse
Apache Phoenix and HBase: Past, Present and Future of SQL over HBase
Apache phoenix
HBaseConEast2016: HBase and Spark, State of the Art
Apache Phoenix: Use Cases and New Features

What's hot (20)

PPTX
April 2014 HUG : Apache Phoenix
PPTX
Apache phoenix
PPTX
Apache Phoenix and Apache HBase: An Enterprise Grade Data Warehouse
PDF
Large-Scale Stream Processing in the Hadoop Ecosystem
PDF
Five major tips to maximize performance on a 200+ SQL HBase/Phoenix cluster
PPTX
HBaseCon 2015: Apache Phoenix - The Evolution of a Relational Database Layer ...
PPTX
Query Compilation in Impala
PPTX
Apache Phoenix + Apache HBase
PDF
Large-Scale Stream Processing in the Hadoop Ecosystem - Hadoop Summit 2016
PPTX
Phoenix: How (and why) we put the SQL back into the NoSQL
PPTX
HBaseCon 2012 | Mignify: A Big Data Refinery Built on HBase - Internet Memory...
PPTX
Incredible Impala
PDF
Querying the Internet of Things: Streaming SQL on Kafka/Samza and Storm/Trident
PPTX
Apache HBase: State of the Union
PPTX
Local Secondary Indexes in Apache Phoenix
PPTX
Major advancements in Apache Hive towards full support of SQL compliance
PPTX
Dancing with the elephant h base1_final
PDF
Real-time Stream Processing with Apache Flink @ Hadoop Summit
PDF
Using Morphlines for On-the-Fly ETL
PDF
Speed Up Your Queries with Hive LLAP Engine on Hadoop or in the Cloud
April 2014 HUG : Apache Phoenix
Apache phoenix
Apache Phoenix and Apache HBase: An Enterprise Grade Data Warehouse
Large-Scale Stream Processing in the Hadoop Ecosystem
Five major tips to maximize performance on a 200+ SQL HBase/Phoenix cluster
HBaseCon 2015: Apache Phoenix - The Evolution of a Relational Database Layer ...
Query Compilation in Impala
Apache Phoenix + Apache HBase
Large-Scale Stream Processing in the Hadoop Ecosystem - Hadoop Summit 2016
Phoenix: How (and why) we put the SQL back into the NoSQL
HBaseCon 2012 | Mignify: A Big Data Refinery Built on HBase - Internet Memory...
Incredible Impala
Querying the Internet of Things: Streaming SQL on Kafka/Samza and Storm/Trident
Apache HBase: State of the Union
Local Secondary Indexes in Apache Phoenix
Major advancements in Apache Hive towards full support of SQL compliance
Dancing with the elephant h base1_final
Real-time Stream Processing with Apache Flink @ Hadoop Summit
Using Morphlines for On-the-Fly ETL
Speed Up Your Queries with Hive LLAP Engine on Hadoop or in the Cloud
Ad

Viewers also liked (20)

PPTX
IBM Message Hub service in Bluemix - Apache Kafka in a public cloud
PPTX
Being Ready for Apache Kafka - Apache: Big Data Europe 2015
PDF
Introducing IBM Message Hub: Cloud-scale messaging based on Apache Kafka
PPTX
Architecture of Flink's Streaming Runtime @ ApacheCon EU 2015
PDF
IBM Message Hub: Cloud-Native Messaging
PPTX
Apache Kylin @ Big Data Europe 2015
PPTX
Fraud Detection in Real-time @ Apache Big Data Con
PDF
Effectively Managing a Hybrid Messaging Environment
PDF
Hortonworks Technical Workshop: HBase and Apache Phoenix
PDF
Hybrid Messaging with IBM Bluemix
PDF
Geospatial querying in Apache Marmotta - ApacheCon Big Data Europe 2015
PDF
HBase + Hue - LA HBase User Group
PDF
Hue: The Hadoop UI - Hadoop Singapore
PDF
August 2013 HUG: Hue: the UI for Apache Hadoop
PDF
HBase Data Types (WIP)
PPTX
HBase Low Latency, StrataNYC 2014
PDF
Bring Cartography to the Cloud
PDF
The Many Faces of Apache Kafka: Leveraging real-time data at scale
PDF
Connect 2017 DEV-1420 - Blue Mix and Domino – Complementing Smartcloud
PDF
HBase Data Types
IBM Message Hub service in Bluemix - Apache Kafka in a public cloud
Being Ready for Apache Kafka - Apache: Big Data Europe 2015
Introducing IBM Message Hub: Cloud-scale messaging based on Apache Kafka
Architecture of Flink's Streaming Runtime @ ApacheCon EU 2015
IBM Message Hub: Cloud-Native Messaging
Apache Kylin @ Big Data Europe 2015
Fraud Detection in Real-time @ Apache Big Data Con
Effectively Managing a Hybrid Messaging Environment
Hortonworks Technical Workshop: HBase and Apache Phoenix
Hybrid Messaging with IBM Bluemix
Geospatial querying in Apache Marmotta - ApacheCon Big Data Europe 2015
HBase + Hue - LA HBase User Group
Hue: The Hadoop UI - Hadoop Singapore
August 2013 HUG: Hue: the UI for Apache Hadoop
HBase Data Types (WIP)
HBase Low Latency, StrataNYC 2014
Bring Cartography to the Cloud
The Many Faces of Apache Kafka: Leveraging real-time data at scale
Connect 2017 DEV-1420 - Blue Mix and Domino – Complementing Smartcloud
HBase Data Types
Ad

Similar to Apache Big Data EU 2015 - Phoenix (20)

PPTX
HBaseCon2015-final
PPTX
Taming HBase with Apache Phoenix and SQL
PDF
hbaseconasia2019 Phoenix Improvements and Practices on Cloud HBase at Alibaba
PPTX
Apache Phoenix: We put the SQL back in NoSQL
PPTX
eHarmony @ Hbase Conference 2016 by vijay vangapandu.
PPTX
HBaseCon2016-final
PPTX
Apache Phoenix and HBase: Past, Present and Future of SQL over HBase
PPT
Phoenix h basemeetup
PDF
Cost-based Query Optimization in Apache Phoenix using Apache Calcite
PDF
Cost-Based query optimization
PDF
Cost-based Query Optimization
PDF
phoenix-on-calcite-hadoop-summit-2016
PPTX
Apache Phoenix and HBase - Hadoop Summit Tokyo, Japan
PPTX
HBaseConAsia2018 Track2-4: HTAP DB-System: AsparaDB HBase, Phoenix, and Spark
PPTX
Unit II Hadoop Ecosystem_Updated.pptx
PDF
Apache Drill talk ApacheCon 2018
PPTX
Spring-Boot-PQS with Apache Ignite Caching @ HbaseCon PhoenixCon Dataworks su...
PPTX
Not your dad's h base new
PPTX
Couchbase Tutorial: Big data Open Source Systems: VLDB2018
PDF
Past, Present, and Pachyderm - All Things Open - 2013
HBaseCon2015-final
Taming HBase with Apache Phoenix and SQL
hbaseconasia2019 Phoenix Improvements and Practices on Cloud HBase at Alibaba
Apache Phoenix: We put the SQL back in NoSQL
eHarmony @ Hbase Conference 2016 by vijay vangapandu.
HBaseCon2016-final
Apache Phoenix and HBase: Past, Present and Future of SQL over HBase
Phoenix h basemeetup
Cost-based Query Optimization in Apache Phoenix using Apache Calcite
Cost-Based query optimization
Cost-based Query Optimization
phoenix-on-calcite-hadoop-summit-2016
Apache Phoenix and HBase - Hadoop Summit Tokyo, Japan
HBaseConAsia2018 Track2-4: HTAP DB-System: AsparaDB HBase, Phoenix, and Spark
Unit II Hadoop Ecosystem_Updated.pptx
Apache Drill talk ApacheCon 2018
Spring-Boot-PQS with Apache Ignite Caching @ HbaseCon PhoenixCon Dataworks su...
Not your dad's h base new
Couchbase Tutorial: Big data Open Source Systems: VLDB2018
Past, Present, and Pachyderm - All Things Open - 2013

More from Nick Dimiduk (8)

PDF
Apache HBase 1.0 Release
PDF
HBase Blockcache 101
PDF
Apache HBase Low Latency
PDF
Apache HBase for Architects
PDF
HBase for Architects
PDF
HBase Client APIs (for webapps?)
PPTX
Pig, Making Hadoop Easy
KEY
Introduction to Hadoop, HBase, and NoSQL
Apache HBase 1.0 Release
HBase Blockcache 101
Apache HBase Low Latency
Apache HBase for Architects
HBase for Architects
HBase Client APIs (for webapps?)
Pig, Making Hadoop Easy
Introduction to Hadoop, HBase, and NoSQL

Recently uploaded (20)

PPTX
A Presentation on Artificial Intelligence
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Machine learning based COVID-19 study performance prediction
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Encapsulation theory and applications.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Approach and Philosophy of On baking technology
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
A Presentation on Artificial Intelligence
Per capita expenditure prediction using model stacking based on satellite ima...
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Machine learning based COVID-19 study performance prediction
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Advanced methodologies resolving dimensionality complications for autism neur...
Encapsulation theory and applications.pdf
Review of recent advances in non-invasive hemoglobin estimation
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Mobile App Security Testing_ A Comprehensive Guide.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
NewMind AI Weekly Chronicles - August'25 Week I
Unlocking AI with Model Context Protocol (MCP)
Approach and Philosophy of On baking technology
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Digital-Transformation-Roadmap-for-Companies.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
NewMind AI Monthly Chronicles - July 2025
Diabetes mellitus diagnosis method based random forest with bat algorithm

Apache Big Data EU 2015 - Phoenix

  • 1. V5   The  Evolu*on  of  a  Rela*onal  Database  Layer  over  HBase   @ApachePhoenix   h0p://phoenix.apache.org   2015-­‐09-­‐29   Nick  Dimiduk  (@xefyr)   h0p://n10k.com   #apachebigdata  
  • 2. Agenda   o  What  is  Apache  Phoenix?   o  State  of  the  Union   o  Latest  Releases   o  A  brief  aside  on  TransacQons   o  What’s  Next?   o  Q  &  A  
  • 3. WHAT  IS  APACHE  PHOENIX   PuUng  the  SQL  back  into  NoSQL  
  • 4. What  is  Apache  Phoenix?   o  A  relaQonal  database  layer  for  Apache  HBase   o  Query  engine   o  Transforms  SQL  queries  into  naQve  HBase  API  calls   o  Pushes   as   much   work   as   possible   onto   the   cluster   for   parallel   execuQon   o  Metadata  repository   o  Typed  access  to  data  stored  in  HBase  tables   o  A  JDBC  driver   o  A  top  level  Apache  So_ware  FoundaQon  project   o  Originally  developed  at  Salesforce   o  A  growing  community  with  momentum  
  • 5. What  is  Apache  Phoenix?   ==   ==  
  • 6. Where  Does  Phoenix  Fit  In?  Sqoop     RDB  Data  Collector   Flume     Log  Data  Collector   Zookeeper   CoordinaQon   YARN  /  MRv2   Cluster  Resource   Manager  /   MapReduce   HDFS   Hadoop  Distributed  File  System   GraphX   Graph  analysis   framework   Phoenix   Query  execuQon  engine   HBase   Distributed  Database   The  Java  Virtual  Machine   Hadoop   Common  JNI   Spark   IteraQve  In-­‐Memory   ComputaQon   MLLib   Data  mining   Pig   Data  ManipulaQon   Hive   Structured  Query   Phoenix   JDBC  client  
  • 7. Phoenix  Puts  the  SQL  Back  in  NoSQL   o  Familiar  SQL  interface  for  (DDL,  DML,  etc.)   o Read  only  views  on  exisQng  HBase  data   o Dynamic  columns  extend  schema  at  runQme   o Flashback  queries  using  versioned  schema   o  Data  types   o  Secondary  indexes   o  Joins   o  Query  planning  and  opQmizaQon   o  MulQ-­‐tenancy  
  • 8. Phoenix  Puts  the  SQL  Back  in  NoSQL   Accessing  HBase  data  with  Phoenix  can  be  substanQally  easier  than  direct   HBase  API  use       Versus     HTable t = new HTable(“foo”); RegionScanner s = t.getScanner(new Scan(…, new ValueFilter(CompareOp.GT, new CustomTypedComparator(30)), …)); while ((Result r = s.next()) != null) { // blah blah blah Java Java Java } s.close(); t.close(); SELECT * FROM foo WHERE bar > 30 HTable t = new HTable(“foo”); RegionScanner s = t.getScanner(new Scan(…, new ValueFilter(CompareOp.GT, new CustomTypedComparator(30)), …)); while ((Result r = s.next()) != null) { // blah blah blah Java Java Java } s.close(); t.close(); Your  BI  tool   probably  can’t  do   this   (And  we  didn’t  include  error  handling…)  
  • 9. STATE  OF  THE  UNION   So  how’s  things?  
  • 11. State  of  the  Union   o  SQL  Support:  Broad  enough  to  run  TPC  queries   o  Joins,  Sub-­‐queries,  Derived  tables,  etc.   o  Secondary  Indices:  Three  different  strategies   o  Immutable  for  write-­‐once/append  only  data     o  Global  for  read-­‐heavy  mutable  data   o  Local  for  write-­‐heavy  mutable  or  immutable  data   o  StaQsQcs  driven  parallel  execuQon   o  Monitoring  &  Management   o  Tracing,  metrics  
  • 12. Join  and  Subquery  Support o Grammar   o inner  join;  le_/right/full  outer  join;  cross  join   o AddiQonal   o semi  join;  anQ  join   o Algorithms   o hash-­‐join;  sort-­‐merge-­‐join   o OpQmizaQons   o Predicate  push-­‐down;  FK-­‐to-­‐PK  join  opQmizaQon;   Global  index  with  missing  data  columns;  Correlated   subquery  rewrite  
  • 13. TPC  Example  1   Small-­‐QuanQty-­‐Order  Revenue  Query  (Q17) select sum(l_extendedprice) / 7.0 as avg_yearly from lineitem, part where p_partkey = l_partkey and p_brand = '[B]' and p_container = '[C]' and l_quantity < ( select 0.2 * avg(l_quantity) from lineitem where l_partkey = p_partkey ); CLIENT 4-WAY FULL SCAN OVER lineitem PARALLEL INNER JOIN TABLE 0 CLIENT 1-WAY FULL SCAN OVER part SERVER FILTER BY p_partkey = ‘[B]’ AND p_container = ‘[C]’ PARALLEL INNER JOIN TABLE 1 CLIENT 4-WAY FULL SCAN OVER lineitem SERVER AGGREGATE INTO DISTINCT ROWS BY l_partkey AFTER-JOIN SERVER FILTER BY l_quantity < $0
  • 14. TPC  Example  2   Order  Priority  Checking  Query  (Q4) select o_orderpriority, count(*) as order_count from orders where o_orderdate >= date '[D]' and o_orderdate < date '[D]' + interval '3' month and exists ( select * from lineitem where l_orderkey = o_orderkey and l_commitdate < l_receiptdate ) group by o_orderpriority order by o_orderpriority; CLIENT 4-WAY FULL SCAN OVER orders SERVER FILTER o_orderdate >= ‘[D]’ AND o_orderdate < ‘[D]’ + 3(d) SERVER AGGREGATE INTO ORDERED DISTINCT ROWS BY o_orderpriority CLIENT MERGE SORT SKIP-SCAN JOIN TABLE 0 CLIENT 4-WAY FULL SCAN OVER lineitem SERVER FILTER BY l_commitdate < l_receiptdate DYNAMIC SERVER FILTER BY o_orderkey IN l_orderkey
  • 15. Join  support  -­‐  what  can't  we  do? o Nested  Loop  Join   o StaQsQcs  Guided  Join  Algorithm   o Smartly  choose  the  smaller  table  for  the  build  side   o Smartly  switch  between  hash-­‐join  and  sort-­‐merge-­‐join   o Smartly  turn  on/off  FK-­‐to-­‐PK  join  opQmizaQon
  • 16. LATEST  RELEASES   The  new  goodness,  from  our  community  to  your  datacenter!  
  • 17. Phoenix  4.4   o  HBase  1.0  Support   o  Func*onal  Indexes   o  User  Defined  Func*ons   o  Query  Server  with  Thin  Driver   o  Union  All  support   o  TesQng  at  scale  with  Pherf   o  MR  index  build   o  Spark  integraQon   o  Date  built-­‐in  funcQons  –  WEEK,  DAYOFMONTH,  etc.  
  • 18. Phoenix  4.4:  FuncQonal  Indexes   o CreaQng  an  index  on  an  expression  as   opposed  to  just  a  column  value.   o Example  without  index,  full  table  scan:   SELECT  AVG(response_*me)  FROM  SERVER_METRICS   WHERE  DAYOFMONTH(create_*me)  =  1   o Add  funcQonal  index,  range  scan:   CREATE  INDEX  day_of_month_idx   ON  SERVER_METRICS  (DAYOFMONTH(create_*me))   INCLUDE  (response_*me)  
  • 19. Phoenix  4.4:  User  Defined  FuncQons   o  Extension  points  to  Phoenix  for  domain-­‐specific   funcQons.   o  For  example,  a  geo-­‐locaQon  applicaQon  might  load  a   set  of  UDFs  like  this:   CREATE  FUNCTION  WOEID_DISTANCE(INTEGER,INTEGER)     RETURNS  INTEGER  AS  ‘org.apache.geo.woeidDistance’   USING  JAR  ‘/lib/geo/geoloc.jar’   o  Querying,  funcQonal  indexing,  etc.  then  possible:   SELECT  *  FROM  woeid  a  JOIN  woeid  b  ON  a.country  =  b.country   WHERE  woeid_distance(a.ID,b.ID)  <  5  
  • 20. Phoenix  4.4:  Query  Server  +  Thin  Driver   o  Offloads  query  planning  and  execuQon  to  different   server(s)   o  Minimizes  client  dependencies   o  Enabler  for  ODBC  driver  (work  in  progress)   o  Connect  like  this  instead:   Connection conn = DriverManager.getConnection( "jdbc:phoenix:thin:url=http://localhost:8765"); o  SQll  evolving:  no  backward  compa*bility  guarantees  yet     h0p://phoenix.apache.org/server.html  
  • 21. Phoenix  4.4   o  HBase  1.0  Support   o  FuncQonal  Indexes   o  User  Defined  FuncQons   o  Query  Server  with  Thin  Driver   o  Union  All  support   o  Tes*ng  at  scale  with  Pherf   o  MR  index  build   o  Spark  integra*on   o  Date  built-­‐in  func*ons  –  WEEK,  DAYOFMONTH,  &c.    
  • 22. Phoenix  4.5   o  HBase  1.1  Support   o  Client-­‐side  per-­‐statement  metrics   o  SELECT  without  FROM   o  Now  possible  to  alter  tables  with  views   o  Math  built-­‐in  funcQons  –  SIGN,  SQRT,  CBRT,  EXP,  &c.   o  Array  built-­‐in  funcQons  –  ARRAY_CAT,  ARRAY_FILL,   &c.   o  UDF,  View,  FuncQonal  Index  enhancements   o  Pherf  and  Performance  enhancements  
  • 23. TRANSACTIONS   I  was  told  there  would  be…  
  • 24. TransacQons  (Work  in  Progress)   o  Snapshot  isolaQon  model   o  Using  Tephra  (h0p://tephra.io/)   o  Supports  REPEATABLE_READ  isolaQon  level   o  Allows  reading  your  own  uncommi0ed  data   o  OpQonal   o  Enabled  on  a  table  by  table  basis   o  No  performance  penalty  when  not  used   o  Work  in  progress,  but  close  to  release   o  Try  our  txn  branch   o  Will  be  available  in  next  release  
  • 25. OpQmisQc  Concurrency  Control   •  Avoids cost of locking rows and tables •  No deadlocks or lock escalations •  Cost of conflict detection and possible rollback is higher •  Good if conflicts are rare: short transaction, disjoint partitioning of work •  Conflict detection not always necessary: write-once/ append-only data
  • 26. Tephra  Architecture   ZooKeeper Tx Manager (standby) HBase Master 1 Master 2 RS 1 RS 2 RS 4 RS 3 Client 1 Client 2 Client N Tx Manager (active)
  • 27. time out try abort failed roll back in HBase write to HBase do work Client Tx Manager none complete V abortsucceeded in progress start tx start start tx commit try commit check conflicts invalid X invalidate failed TransacQon  Lifecycle  
  • 28. Tephra  Architecture   •  TransactionAware client! •  Coordinates transaction lifecycle with manager •  Communicates directly with HBase for reads and writes •  Transaction Manager •  Assigns transaction IDs •  Maintains state on in-progress, committed and invalid transactions! •  Transaction Processor coprocessor •  Applies server-side filtering for reads •  Cleans up data from failed transactions, and no longer visible versions
  • 29. WHAT’S  NEXT?   A  brave  new  world  
  • 30. What’s  Next?   o Is  Phoenix  done?   o What  about  the  Big  Picture?   o How  can  Phoenix  be  leveraged  in  the  larger   ecosystem?   o Hive,  Pig,  MR  integraQon  with  Phoenix  today,  but   it’s  not  a  great  story  
  • 31. What’s  Next?   You  are  here  
  • 32. Moving  to  Apache  Calcite   o  Query  parser,  compiler,  and  planner  framework   o SQL-­‐92  compliant  (ever  argue  SQL  with  Julian?  :-­‐)  )   o Enables  Phoenix  to  get  missing  SQL  support   o  Pluggable  cost-­‐based  opQmizer  framework   o Sane  way  to  model  push  down  through  rules   o  Interop  with  other  Calcite  adaptors   o Not  for  free,  but  it  becomes  feasible   o Already  used  by  Drill,  Hive,  Kylin,  Samza   o Supports  any  JDBC  source  (i.e.  RDBMS  -­‐  remember   them  :-­‐)  )   o One  cost-­‐model  to  rule  them  all  
  • 33. How  does  Phoenix  plug  in?   Calcite  Parser  &  Validator Calcite  Query  OpQmizer Phoenix  Query  Plan  Generator Phoenix  RunQme Phoenix  Tables  over  HBase   JDBC  Client SQL  +  Phoenix   specific   grammar Built-­‐in  rules   +  Phoenix   specific  rules
  • 34. OpQmizaQon  Rules   o AggregateRemoveRule   o FilterAggregateTransposeRule   o FilterJoinRule   o FilterMergeRule   o JoinCommuteRule   o PhoenixFilterScanMergeRule   o PhoenixJoinSingleAggregateMergeRule   o …  
  • 35. Query  Example     (filter  push-­‐down  and  smart  join  algorithm)   LogicalFilter   filter:  $0  =  ‘x’ LogicalJoin   type:  inner   cond:  $3  =  $7 LogicalProject   projects:  $0,  $5 LogicalTableScan   table:  A LogicalTableScan   table:  B PhoenixTableScan   table:  ‘a’   filter:  $0  =  ‘x’   PhoenixServerJoin   type:  inner   cond:  $3  =  $1 PhoenixServerProject   projects:  $2,  $0 OpQmizer   (with   RelOptRules  &   ConvertRules)   PhoenixTableScan   table:  ‘b’   PhoenixServerProject   projects:  $0,  $2 PhoenixServerProject   projects:  $0,  $3
  • 36. Query  Example   (filter  push-­‐down  and  smart  join  algorithm) ScanPlan   table:  ‘a’   skip-­‐scan:  pk0  =  ‘x’   projects:  pk0,  c3 HashJoinPlan   types  {inner} join-­‐keys:  {$1} projects:  $2,  $0 Build   hash-­‐key:  $1 Phoenix   Implementor   PhoenixTableScan   table:  ‘a’   filter:  $0  =  ‘x’   PhoenixServerJoin   type:  inner   cond:  $3  =  $1 PhoenixServerProject   projects:  $2,  $0 PhoenixTableScan   table:  ‘b’   PhoenixServerProject   projects:  $0,  $2 PhoenixServerProject   projects:  $0,  $3 ScanPlan   table:  ‘b’   projects:  col0,  col2   Probe
  • 37. Interoperability  Example   o Joining  data  from  Phoenix  and  mySQL   EnumerableJoin PhoenixTableScan JdbcTableScan Phoenix  Tables  over  HBase   mySQL  Database   PhoenixToEnumerable   Converter JdbcToEnumerable   Converter
  • 38. Query  Example  1 WITH  m  AS            (SELECT  *              FROM  dept_manager  dm              WHERE  from_date  =                      (SELECT  max(from_date)                        FROM  dept_manager  dm2                        WHERE  dm.dept_no  =  dm2.dept_no))     SELECT  m.dept_no,  d.dept_name,  e.first_name,  e.last_name     FROM  employees  e     JOIN  m  ON  e.emp_no  =  m.emp_no   JOIN  departments  d  ON  d.dept_no  =  m.dept_no   ORDER  BY  d.dept_no;
  • 39. Query  Example  2   SELECT  dept_no,  Qtle,  count(*)     FROM  Qtles  t     JOIN  dept_emp  de  ON  t.emp_no  =  de.emp_no   WHERE  dept_no  <=  'd006'   GROUP  BY  rollup(dept_no,  *tle)     ORDER  BY  dept_no,  Qtle;  
  • 40. V5   Thanks!   @ApachePhoenix   h0p://phoenix.apache.org   2015-­‐09-­‐29   Nick  Dimiduk  (@xefyr)   h0p://n10k.com   #apachebigdata