The Types
�Piotr Findeisen @SDF
Agenda
2
@SDF
About me
3
@SDF
What is the type system?
4
@SDF
What do we need a type system for?
5
functions!
@SDF
f(x)
6
@SDF
Arrow types
7
@SDF
Arrow functions
8
/// Perform `lhs + rhs`, returning an error on overflow
pub fn add(lhs: &dyn Datum, rhs: &dyn Datum)�-> Result<ArrayRef, ArrowError> {
arithmetic_op(Op::Add, lhs, rhs)
}
@SDF
SQL types
9
@SDF
SQL functions
10
@SDF
Apache DataFusion
"SQL query engine built on Apache Arrow"�
11
@SDF
curr Apache DataFusion
12
@SDF
Problems? - too much
Arrow type system represents what the value is�(and how it's stored right now)�
SQL type system represents what a value can be �(storage-agnostic)
13
@SDF
Problems? - too little
14
@SDF
Problems? - complexity
15
@SDF
Problems? - overhead
16
@SDF
🤔
�The SQL is a statically typed, abstract language.
�Should SQL query engine use statically typed,�physical representation?
17
@SDF
next Apache DataFusion - The Types
18
@SDF
Logical → Physical
19
@SDF
Challenges
20
@SDF