Building Efficient Query Engines in a High-Level Language