Morel, a functional query language
summary
Morel implements Standard ML on the JVM with language extensions that make relations first-class, compiles ML-style programs to relational algebra, and hands plans to the Apache Calcite optimizer (about 200 rewrite rules) so queries run on database backends or distributed engines. It supports functions-as-values, from/.../yield comprehensions, view-style inlining, and demos like a working word-count that run on optimized relational plans rather than ad‑hoc map/reduce.
AI-written summary · about
chapters (20)
- 0:00Intro
- 0:54Building a document index
- 2:26Data-parallel programming
- 6:49What are our options?
- 10:12Evolution of functional languages
- 10:59Extend Standard ML
- 12:12Themes
- 14:37Standard ML: Values and types
- 15:50Standard ML: variables and functions
- 16:44Algebraic data types, case, and recursion
- 18:31Relations and higher-order functions
- 19:37Implementing Join using higher-order functions
- 20:28Implementing Join in Morel using from
- 22:17Word Count
- 28:01Chaining relational operators - step 5
- 32:14Algebraic rewrite
- 33:07Integration with Apache Calcite - schemas
- 34:42Integration with Apache Calcite - relational algebra
- 35:27Optimization
- 37:39Compute models
related talks
32mArel: The Ruby Relational Algebra Library
05mRelational Programming
48mCompositional, Expressive, Performant Database Queries: Choose 3
35mAdvanced aRel: When ActiveRecord Just Isn't Enough
35mComprehending queries over finite maps
32mSimplify End-To-End MLOps with PostgresML
16mA Compiler for Fused Relational Operations on Multisets
47mJOOQ, Joy of SQL
