Professional Documents
Culture Documents
An Introductory Guide
Andy Grove
This book is for sale at http://leanpub.com/how-query-engines-work
This is a Leanpub book. Leanpub empowers authors and publishers with the Lean Publishing
process. Lean Publishing is the act of publishing an in-progress ebook using lightweight tools and
many iterations to get reader feedback, pivot until you have the right book and build traction once
you do.
1. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2.1 Feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
4. Apache Arrow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
4.1 Arrow Memory Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
4.2 Inter-Process Communication (IPC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
4.3 Arrow Flight Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
4.4 Compute Kernels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
4.5 Query Engines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
6. Data Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
6.1 Data Source Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
6.2 Data Source Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
15. Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
15.1 Unit Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
15.2 Integration Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
15.3 Fuzzing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
16. Benchmarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
16.1 Measuring Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
16.2 Measuring Scalability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
16.3 Concurrency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
16.4 Automation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
16.5 Comparing Benchmarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
16.6 Publishing Benchmark Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.1 Feedback
Please visit this book’s Leanpub forum at https://leanpub.com/how-query-engines-work/feedback
to provide feedback, or send me a DM on Twitter at @andygrove73.
3. What Is a Query Engine?
This content is not available in the sample book. The book can be purchased on Leanpub at http:
//leanpub.com/how-query-engines-work.
DataFusion
This content is not available in the sample book. The book can be purchased on Leanpub at http:
//leanpub.com/how-query-engines-work.
Apache Arrow 3
Ballista
This content is not available in the sample book. The book can be purchased on Leanpub at http:
//leanpub.com/how-query-engines-work.
5.2 Interoperability
This content is not available in the sample book. The book can be purchased on Leanpub at http:
//leanpub.com/how-query-engines-work.
JSON
This content is not available in the sample book. The book can be purchased on Leanpub at http:
//leanpub.com/how-query-engines-work.
Parquet
This content is not available in the sample book. The book can be purchased on Leanpub at http:
//leanpub.com/how-query-engines-work.
Orc
This content is not available in the sample book. The book can be purchased on Leanpub at http:
//leanpub.com/how-query-engines-work.
7. Logical Plans & Expressions
This content is not available in the sample book. The book can be purchased on Leanpub at http:
//leanpub.com/how-query-engines-work.
7.2 Serialization
This content is not available in the sample book. The book can be purchased on Leanpub at http:
//leanpub.com/how-query-engines-work.
7.12 Scan
This content is not available in the sample book. The book can be purchased on Leanpub at http:
//leanpub.com/how-query-engines-work.
7.13 Projection
This content is not available in the sample book. The book can be purchased on Leanpub at http:
//leanpub.com/how-query-engines-work.
Logical Plans & Expressions 8
7.14 Selection
This content is not available in the sample book. The book can be purchased on Leanpub at http:
//leanpub.com/how-query-engines-work.
7.15 Aggregate
This content is not available in the sample book. The book can be purchased on Leanpub at http:
//leanpub.com/how-query-engines-work.
8. Building Logical Plans
This content is not available in the sample book. The book can be purchased on Leanpub at http:
//leanpub.com/how-query-engines-work.
9.9 Scan
This content is not available in the sample book. The book can be purchased on Leanpub at http:
//leanpub.com/how-query-engines-work.
9.10 Projection
This content is not available in the sample book. The book can be purchased on Leanpub at http:
//leanpub.com/how-query-engines-work.
9.11 Selection
This content is not available in the sample book. The book can be purchased on Leanpub at http:
//leanpub.com/how-query-engines-work.
12.1 Tokenizer
This content is not available in the sample book. The book can be purchased on Leanpub at http:
//leanpub.com/how-query-engines-work.
14.6 Streaming
This content is not available in the sample book. The book can be purchased on Leanpub at http:
//leanpub.com/how-query-engines-work.
Distributed Query Execution 18
14.11 Stability
This content is not available in the sample book. The book can be purchased on Leanpub at http:
//leanpub.com/how-query-engines-work.
15. Testing
This content is not available in the sample book. The book can be purchased on Leanpub at http:
//leanpub.com/how-query-engines-work.
15.3 Fuzzing
This content is not available in the sample book. The book can be purchased on Leanpub at http:
//leanpub.com/how-query-engines-work.
16. Benchmarks
This content is not available in the sample book. The book can be purchased on Leanpub at http:
//leanpub.com/how-query-engines-work.
16.3 Concurrency
This content is not available in the sample book. The book can be purchased on Leanpub at http:
//leanpub.com/how-query-engines-work.
16.4 Automation
This content is not available in the sample book. The book can be purchased on Leanpub at http:
//leanpub.com/how-query-engines-work.
Hardware Configuration
This content is not available in the sample book. The book can be purchased on Leanpub at http:
//leanpub.com/how-query-engines-work.
Environment
This content is not available in the sample book. The book can be purchased on Leanpub at http:
//leanpub.com/how-query-engines-work.
Benchmarks 21
Benchmark Configuration
This content is not available in the sample book. The book can be purchased on Leanpub at http:
//leanpub.com/how-query-engines-work.
Benchmark Results
This content is not available in the sample book. The book can be purchased on Leanpub at http:
//leanpub.com/how-query-engines-work.
17.2 YouTube
This content is not available in the sample book. The book can be purchased on Leanpub at http:
//leanpub.com/how-query-engines-work.