Databases · Cluster

Query Processing

Parsing, planning, and execution operators.

  1. 01 Parsing SQL: Clause Structure and Expression Precedence How a statement becomes a parse tree, where the SQL grammar is genuinely ambiguous, and which decisions the parser deliberately leaves to later stages. foundational · Oct 21, 2023
  2. 02 Name Resolution and Binding a Query to the Catalog How an unresolved syntax tree becomes a typed expression tree: namespace scoping, column ambiguity, view expansion, and where implicit casts are inserted. foundational · Apr 29, 2026
  3. 03 Logical Plans and Rewrite Rules That Preserve Results Why the planner rewrites a bound query into relational algebra before choosing algorithms, and which transformations are safe under NULLs, outer joins, and volatile functions. foundational · Apr 30, 2026
  4. 04 Physical Operator Selection and Access Path Mechanics What distinguishes a sequential scan from an index scan, a bitmap heap scan from an index-only scan, and how each access path decides when to stop reading. intermediate · Jul 3, 2024
  5. 05 External Merge Sort: Runs, Fan-in, and the Sort-Merge Join How a sort spills to disk, why replacement selection builds longer runs than naive chunking, and how the merge phase feeds a sort-merge join without a second pass. intermediate · Nov 28, 2025
  6. 06 Hash Joins and Hash Aggregation: Build, Probe, and Spill How a hash table is built from one join input, why the probe side must be streamed, and what happens when the build side exceeds the memory grant. intermediate · Jul 19, 2022
  7. 07 Grouping, Duplicate Elimination, and Grouping Sets What a GROUP BY actually computes, how the sort-based and hash-based forms differ in output order, and how ROLLUP and CUBE collapse into one scan. intermediate · Jul 27, 2022
  8. 08 Exchange Operators: Partitioning, Broadcasting, and Parallel Pipelines How a plan is divided into fragments, what a repartition exchange does to tuple order and memory, and why the exchange is the only operator that moves rows between workers. advanced · May 19, 2023
  9. 09 Vectorized Execution: Batches, Selection Vectors, and Push vs Pull Why processing tuples in column batches amortizes interpretation overhead, how selection vectors represent filtered rows, and what a push-based pipeline changes. advanced · Jan 15, 2025
  10. 10 Adaptive Execution: Runtime Filters and Mid-Query Replanning How a running plan uses observed cardinalities to change join strategy, and how bloom filters and partition pruning eliminate work before it happens. advanced · Dec 6, 2022