Making an Optimizer Run TPC-H: Lossless Conversion and Execution Reconciliation for 22 Queries

An optimizer is worth using when it can digest all 22 TPC-H queries — not when it can run a couple of toy examples. This post records how we took COLUMBIA (see the previous post) from “runs Chain2” to “handles the whole TPC-H suite.” 1. Principle: convert as-is, never rewrite for the optimizer The first step wasn’t code, it was rules: As-is conversion: no restructuring of TPC-H SQL to make the optimizer’s life easier; Record what’s unsupported: syntax the optimizer can’t express yet goes on a TODO list, never gets deleted from the query; Reconcilable: the conversion must be provably equivalent to the original. The value of this discipline only shows up later: it turns “capability gaps” into a quantified list instead of a vague pile of failures. ...

October 20, 2026 · 4 min · daviszhen