Software Engineering
Holey: Meta-properties catch wrong-result bugs in data-processing frameworks
A new testing approach uses reusable property templates to systematically find silent bugs in Apache Spark and Flink that traditional testing misses.
Data processing platforms like Apache Spark and Flink continually grow their capabilities, but their rapid API expansion outpaces the ability to thoroughly test new functionality. The most insidious bugs in these systems don't crash—they return incorrect results silently, evading crash-detection tools. Property-based testing can catch such defects, yet writing exhaustive properties remains impractical at scale.
The testing bottleneck#
Developers traditionally write one property per API operation, testing that the operation behaves correctly under various inputs. This manual approach cannot keep pace with frameworks that release dozens of new operators and data types regularly. Moreover, existing SQL testing approaches like TLP and NoREC cannot express all the correctness constraints that matter in practice.
Meta-properties as reusable templates#
Researchers observed that many correctness properties boil down to a handful of fundamental principles: congruence (equivalent expressions produce the same results), relational-algebra equivalences (mathematical transformations preserve meaning), and aggregate decomposition (partial aggregations combine correctly). These principles apply not just to single operators but to entire analytical workflows built around them.
Holey introduces meta-properties—property templates with holes. A meta-property specifies how a workload must be transformed and what relationships its outputs must satisfy, while leaving the specific expressions or operators abstract. Developers fill the holes with short bindings (averaging under 20 lines), and Holey automatically generates thousands of executable tests by constructing schema-valid multi-stage workloads and inputs.
Typing ensures correctness#
Each meta-property includes a typing rule governing its holes. A binding is validated once against this rule; the team proved that every test generated from a type-correct binding is automatically schema-valid. This design drastically reduces the manual verification burden.
Real-world impact#
Testing with seven meta-properties derived 207 concrete properties, which uncovered 17 previously unknown bugs in the latest releases of Spark and Flink. Notably, nine of these bugs required correctness constraints that existing SQL testing oracles could not express. The meta-properties captured 55 of 65 testable historical Spark correctness issues, and generated workloads achieved 1.9x greater branch coverage than CometFuzz, a competing fuzzing tool.