SlideShare une entreprise Scribd logo
1  sur  32
Télécharger pour lire hors ligne
User Defined Functions 
… new in Apache Cassandra 3.0 
CASSANDRA-7395 + many more…
Me, Robert… 
• Contribute code to Apache Cassandra (UDFs, row cache + more) 
• Help customers to build Cassandra solutions 
• Freelancer, Coder 
Robert Stupp, Cologne, Germany 
@snazy snazy@snazy.de
Disclaimer 
• Apache Cassandra 3.0 is the next major release 
• Everything is under development 
• Things may change 
• Things may be different in final 3.0 release
Apache Cassandra 3.0 
• … will bring a lot of cool, new features ! 
• … will bring a lot of great improvements ! 
• UDFs is just one of these features :)
UDF - 
What’s that??
UDF 
• UDF means User Defined Function 
• You write the code that’s executed on Cassandra nodes 
• Functions are distributed transparently to the whole cluster 
• You may not have to wait for a new release for new functionality :)
UDF Characteristics 
• „Pure“ 
• just input parameters 
• no state, side effects, dependencies to other code, etc 
• Usually deterministic
Consider a Java function like… 
import nothing; 
public final class MyClass 
{ 
public static int myFunction ( int argument ) 
{ 
return argument * 42; 
} 
} 
This would be your UDF
CREATE FUNCTION sinPlusFoo 
( 
valueA double, 
valueB double 
arguments 
return type 
) 
RETURNS double 
LANGUAGE java 
AS ’return Math.sin(valueA) + valueB;’; 
Java works out of the box! 
Example 
define the UDF language 
Java code
Next Example 
CREATE FUNCTION sin ( 
value double ) 
RETURNS double 
LANGUAGE javascript 
AS ’Math.sin(value);’; 
JavaScript works out of the box! 
Cassandra 3.0 targets Java8 - so it’s „Nashorn“ 
JavaScript works, too! 
Javascript code
JSR 223 
• “Scripting for the Java Platform“ 
• UDFs can be written in Java and JavaScript 
• Optionally: Groovy, JRuby, Jython, Scala 
• Not: Clojure (JSR 223 implementation’s wrong)
Behind the scenes 
• Builds Java (or script) source 
• Compiles that code (Java class, or compiled script) 
• Loads the compiled code 
• Migrates the function to all other nodes 
• Done - UDF is executable on any node
Types for UDFs 
• Support for all Cassandra types for arguments and return value 
• All means 
• Primitives (boolean, int, double, uuid, etc) 
• Collections (list, set, map) 
• Tuple types, User Defined Types
UDF - 
For what?
UDF invocation 
SELECT sumThat ( colA, colB ) 
Now your application can 
sum two values in one row - 
or create the sin of a value! 
GREAT NEW FEATURES! 
Okay - not really… 
FROM myTable 
WHERE key = ... 
SELECT sin ( foo ) 
FROM myCircle 
WHERE pk = ...
UDFs are good for… 
• UDFs on their own are just „nice to have“ 
• Nothing you couldn’t do better in your application
Real Use Case for UDFs ?
User Defined Aggregates ! 
CASSANDRA-8053
User Defined Aggregates 
Use UDFs to code your own aggregation functions 
(Aggregates are things like SUM, AVG, MIN, MAX, etc) 
Aggregates : 
consume values from multiple rows & 
produce a single result
Example 
name of the aggregate 
function argument types 
CREATE AGGREGATE minimum ( int ) 
STYPE int 
SFUNC minimumState; 
name of the “state“ UDF 
Syntax similar to Postgres. 
state type
How an aggregate works 
SELECT minimum ( val ) FROM foo … 
1. Initial state is set to null 
2. for each row the state function is called with 
current state and column value - returns new state 
3. After all rows the aggregate returns the last state
More sophisticated 
CREATE AGGREGATE average ( int ) 
SFUNC averageState 
STYPE tuple<long,int> 
FINALFUNC averageFinal 
INITCOND (0, 0); 
UDF called after last 
row 
FINALFUNC + INITCOND are optional initial state value
How that aggregate works 
SELECT average ( val ) FROM foo … 
1. Initial state is set to (0,0) 
2. for each row the state function is called with 
current state + column value - returns new state 
3. After all rows the final function is called with last state 
4. final function calculates the aggregate
Now everybody can execute evil 
code on your cluster :)
UDF permissions 
• There will be permissions to restrict (allow) 
• UDF creation (DDL) 
• UDF execution (DML) 
CASSANDRA-7557
Built in functions 
• All known built-in functions are called native functions 
• Native functions belong to SYSTEM keyspace 
• Native functions cannot be modified (or dropped) 
Note: you already know native functions like 
now, count, unixtimestampof
UDF belong to a keyspace 
• User Defined Functions and 
• User Defined Aggregate 
• belong to a keyspace 
• SYSTEM keyspace is searched first for functions 
(then the current keyspace) 
if function/aggregate is not fully qualified
UDF - some final words… 
Keep in mind: 
• JSR-223 has overhead - Java UDFs are much faster 
• Do not allow everyone to create UDFs (in production) 
• Keep your UDFs “pure“ 
• Test your UDFs and user defined aggregates thoroughly
For the geeks :) 
• UDFs and user defined aggregates are executed on the coordinator node 
• Prefer to use Java-UDFs for performance reasons
Let a man dream… 
UDFs could be useful for… 
• Functional indexes 
• Partial indexes 
• Filtering 
• Distributed GROUP BY 
• etc etc
Q & A 
THANK YOU FOR YOUR ATTENTION :) 
Robert Stupp, Cologne, Germany 
@snazy snazy@snazy.de
User defined-functions-cassandra-summit-eu-2014

Contenu connexe

Tendances

Multithreading and Parallelism on iOS [MobOS 2013]
 Multithreading and Parallelism on iOS [MobOS 2013] Multithreading and Parallelism on iOS [MobOS 2013]
Multithreading and Parallelism on iOS [MobOS 2013]
Kuba Břečka
 
April 2010 - JBoss Web Services
April 2010 - JBoss Web ServicesApril 2010 - JBoss Web Services
April 2010 - JBoss Web Services
JBug Italy
 

Tendances (20)

Solid And Sustainable Development in Scala
Solid And Sustainable Development in ScalaSolid And Sustainable Development in Scala
Solid And Sustainable Development in Scala
 
Squeak DBX
Squeak DBXSqueak DBX
Squeak DBX
 
Cassandra 3.0 Awesomeness
Cassandra 3.0 AwesomenessCassandra 3.0 Awesomeness
Cassandra 3.0 Awesomeness
 
CQL performance with Apache Cassandra 3.0 (Aaron Morton, The Last Pickle) | C...
CQL performance with Apache Cassandra 3.0 (Aaron Morton, The Last Pickle) | C...CQL performance with Apache Cassandra 3.0 (Aaron Morton, The Last Pickle) | C...
CQL performance with Apache Cassandra 3.0 (Aaron Morton, The Last Pickle) | C...
 
Demystifying Oak Search
Demystifying Oak SearchDemystifying Oak Search
Demystifying Oak Search
 
How and Where in GLORP
How and Where in GLORPHow and Where in GLORP
How and Where in GLORP
 
Multithreading and Parallelism on iOS [MobOS 2013]
 Multithreading and Parallelism on iOS [MobOS 2013] Multithreading and Parallelism on iOS [MobOS 2013]
Multithreading and Parallelism on iOS [MobOS 2013]
 
Objective-C Is Not Java
Objective-C Is Not JavaObjective-C Is Not Java
Objective-C Is Not Java
 
Data stax academy
Data stax academyData stax academy
Data stax academy
 
Spark workshop
Spark workshopSpark workshop
Spark workshop
 
es6
es6es6
es6
 
SenchaCon 2016: Modernizing the Ext JS Class System - Don Griffin
SenchaCon 2016: Modernizing the Ext JS Class System - Don GriffinSenchaCon 2016: Modernizing the Ext JS Class System - Don Griffin
SenchaCon 2016: Modernizing the Ext JS Class System - Don Griffin
 
Node Boot Camp
Node Boot CampNode Boot Camp
Node Boot Camp
 
A Brief Intro to Scala
A Brief Intro to ScalaA Brief Intro to Scala
A Brief Intro to Scala
 
Scala Introduction
Scala IntroductionScala Introduction
Scala Introduction
 
April 2010 - JBoss Web Services
April 2010 - JBoss Web ServicesApril 2010 - JBoss Web Services
April 2010 - JBoss Web Services
 
Building a Unified Data Pipline in Spark / Apache Sparkを用いたBig Dataパイプラインの統一
Building a Unified Data Pipline in Spark / Apache Sparkを用いたBig Dataパイプラインの統一Building a Unified Data Pipline in Spark / Apache Sparkを用いたBig Dataパイプラインの統一
Building a Unified Data Pipline in Spark / Apache Sparkを用いたBig Dataパイプラインの統一
 
JUnit5 and TestContainers
JUnit5 and TestContainersJUnit5 and TestContainers
JUnit5 and TestContainers
 
The CoFX Data Model
The CoFX Data ModelThe CoFX Data Model
The CoFX Data Model
 
XQuery in the Cloud
XQuery in the CloudXQuery in the Cloud
XQuery in the Cloud
 

Similaire à User defined-functions-cassandra-summit-eu-2014

Similaire à User defined-functions-cassandra-summit-eu-2014 (20)

Supporting Over a Thousand Custom Hive User Defined Functions
Supporting Over a Thousand Custom Hive User Defined FunctionsSupporting Over a Thousand Custom Hive User Defined Functions
Supporting Over a Thousand Custom Hive User Defined Functions
 
Basic info on java intro
Basic info on java introBasic info on java intro
Basic info on java intro
 
Basic info on java intro
Basic info on java introBasic info on java intro
Basic info on java intro
 
Introduction to Murasaki
Introduction to MurasakiIntroduction to Murasaki
Introduction to Murasaki
 
Новый InterSystems: open-source, митапы, хакатоны
Новый InterSystems: open-source, митапы, хакатоныНовый InterSystems: open-source, митапы, хакатоны
Новый InterSystems: open-source, митапы, хакатоны
 
Cross Platform App Development with C++
Cross Platform App Development with C++Cross Platform App Development with C++
Cross Platform App Development with C++
 
Speed up UDFs with GPUs using the RAPIDS Accelerator
Speed up UDFs with GPUs using the RAPIDS AcceleratorSpeed up UDFs with GPUs using the RAPIDS Accelerator
Speed up UDFs with GPUs using the RAPIDS Accelerator
 
Killer Scenarios with Data Lake in Azure with U-SQL
Killer Scenarios with Data Lake in Azure with U-SQLKiller Scenarios with Data Lake in Azure with U-SQL
Killer Scenarios with Data Lake in Azure with U-SQL
 
Advanced Node.JS Meetup
Advanced Node.JS MeetupAdvanced Node.JS Meetup
Advanced Node.JS Meetup
 
Exciting JavaScript - Part II
Exciting JavaScript - Part IIExciting JavaScript - Part II
Exciting JavaScript - Part II
 
Java - A broad introduction
Java - A broad introductionJava - A broad introduction
Java - A broad introduction
 
What is Java Technology (An introduction with comparision of .net coding)
What is Java Technology (An introduction with comparision of .net coding)What is Java Technology (An introduction with comparision of .net coding)
What is Java Technology (An introduction with comparision of .net coding)
 
"Xapi-lang For declarative code generation" By James Nelson
"Xapi-lang For declarative code generation" By James Nelson"Xapi-lang For declarative code generation" By James Nelson
"Xapi-lang For declarative code generation" By James Nelson
 
Hadoop cluster performance profiler
Hadoop cluster performance profilerHadoop cluster performance profiler
Hadoop cluster performance profiler
 
JavaCro'14 - Using WildFly core to build high performance web server – Tomaž ...
JavaCro'14 - Using WildFly core to build high performance web server – Tomaž ...JavaCro'14 - Using WildFly core to build high performance web server – Tomaž ...
JavaCro'14 - Using WildFly core to build high performance web server – Tomaž ...
 
Intro To Node.js
Intro To Node.jsIntro To Node.js
Intro To Node.js
 
How to implement a simple dalvik virtual machine
How to implement a simple dalvik virtual machineHow to implement a simple dalvik virtual machine
How to implement a simple dalvik virtual machine
 
uRequire@greecejs: An introduction to http://uRequire.org
uRequire@greecejs: An introduction to http://uRequire.orguRequire@greecejs: An introduction to http://uRequire.org
uRequire@greecejs: An introduction to http://uRequire.org
 
Short intro to scala and the play framework
Short intro to scala and the play frameworkShort intro to scala and the play framework
Short intro to scala and the play framework
 
Writing MySQL UDFs
Writing MySQL UDFsWriting MySQL UDFs
Writing MySQL UDFs
 

Dernier

Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 

Dernier (20)

VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 

User defined-functions-cassandra-summit-eu-2014

  • 1. User Defined Functions … new in Apache Cassandra 3.0 CASSANDRA-7395 + many more…
  • 2. Me, Robert… • Contribute code to Apache Cassandra (UDFs, row cache + more) • Help customers to build Cassandra solutions • Freelancer, Coder Robert Stupp, Cologne, Germany @snazy snazy@snazy.de
  • 3. Disclaimer • Apache Cassandra 3.0 is the next major release • Everything is under development • Things may change • Things may be different in final 3.0 release
  • 4. Apache Cassandra 3.0 • … will bring a lot of cool, new features ! • … will bring a lot of great improvements ! • UDFs is just one of these features :)
  • 5. UDF - What’s that??
  • 6. UDF • UDF means User Defined Function • You write the code that’s executed on Cassandra nodes • Functions are distributed transparently to the whole cluster • You may not have to wait for a new release for new functionality :)
  • 7. UDF Characteristics • „Pure“ • just input parameters • no state, side effects, dependencies to other code, etc • Usually deterministic
  • 8. Consider a Java function like… import nothing; public final class MyClass { public static int myFunction ( int argument ) { return argument * 42; } } This would be your UDF
  • 9. CREATE FUNCTION sinPlusFoo ( valueA double, valueB double arguments return type ) RETURNS double LANGUAGE java AS ’return Math.sin(valueA) + valueB;’; Java works out of the box! Example define the UDF language Java code
  • 10. Next Example CREATE FUNCTION sin ( value double ) RETURNS double LANGUAGE javascript AS ’Math.sin(value);’; JavaScript works out of the box! Cassandra 3.0 targets Java8 - so it’s „Nashorn“ JavaScript works, too! Javascript code
  • 11. JSR 223 • “Scripting for the Java Platform“ • UDFs can be written in Java and JavaScript • Optionally: Groovy, JRuby, Jython, Scala • Not: Clojure (JSR 223 implementation’s wrong)
  • 12. Behind the scenes • Builds Java (or script) source • Compiles that code (Java class, or compiled script) • Loads the compiled code • Migrates the function to all other nodes • Done - UDF is executable on any node
  • 13. Types for UDFs • Support for all Cassandra types for arguments and return value • All means • Primitives (boolean, int, double, uuid, etc) • Collections (list, set, map) • Tuple types, User Defined Types
  • 14. UDF - For what?
  • 15. UDF invocation SELECT sumThat ( colA, colB ) Now your application can sum two values in one row - or create the sin of a value! GREAT NEW FEATURES! Okay - not really… FROM myTable WHERE key = ... SELECT sin ( foo ) FROM myCircle WHERE pk = ...
  • 16. UDFs are good for… • UDFs on their own are just „nice to have“ • Nothing you couldn’t do better in your application
  • 17. Real Use Case for UDFs ?
  • 18. User Defined Aggregates ! CASSANDRA-8053
  • 19. User Defined Aggregates Use UDFs to code your own aggregation functions (Aggregates are things like SUM, AVG, MIN, MAX, etc) Aggregates : consume values from multiple rows & produce a single result
  • 20. Example name of the aggregate function argument types CREATE AGGREGATE minimum ( int ) STYPE int SFUNC minimumState; name of the “state“ UDF Syntax similar to Postgres. state type
  • 21. How an aggregate works SELECT minimum ( val ) FROM foo … 1. Initial state is set to null 2. for each row the state function is called with current state and column value - returns new state 3. After all rows the aggregate returns the last state
  • 22. More sophisticated CREATE AGGREGATE average ( int ) SFUNC averageState STYPE tuple<long,int> FINALFUNC averageFinal INITCOND (0, 0); UDF called after last row FINALFUNC + INITCOND are optional initial state value
  • 23. How that aggregate works SELECT average ( val ) FROM foo … 1. Initial state is set to (0,0) 2. for each row the state function is called with current state + column value - returns new state 3. After all rows the final function is called with last state 4. final function calculates the aggregate
  • 24. Now everybody can execute evil code on your cluster :)
  • 25. UDF permissions • There will be permissions to restrict (allow) • UDF creation (DDL) • UDF execution (DML) CASSANDRA-7557
  • 26. Built in functions • All known built-in functions are called native functions • Native functions belong to SYSTEM keyspace • Native functions cannot be modified (or dropped) Note: you already know native functions like now, count, unixtimestampof
  • 27. UDF belong to a keyspace • User Defined Functions and • User Defined Aggregate • belong to a keyspace • SYSTEM keyspace is searched first for functions (then the current keyspace) if function/aggregate is not fully qualified
  • 28. UDF - some final words… Keep in mind: • JSR-223 has overhead - Java UDFs are much faster • Do not allow everyone to create UDFs (in production) • Keep your UDFs “pure“ • Test your UDFs and user defined aggregates thoroughly
  • 29. For the geeks :) • UDFs and user defined aggregates are executed on the coordinator node • Prefer to use Java-UDFs for performance reasons
  • 30. Let a man dream… UDFs could be useful for… • Functional indexes • Partial indexes • Filtering • Distributed GROUP BY • etc etc
  • 31. Q & A THANK YOU FOR YOUR ATTENTION :) Robert Stupp, Cologne, Germany @snazy snazy@snazy.de