Framework for Testing Query Transformation Rules
First Claim
1. In a computing environment, a method performed on at least one processor comprising:
- obtaining a rule pattern corresponding to a transformation rule of a transformation rule-based query optimizer of a database management system;
generating a query based upon the rule pattern;
providing the query to the transformation rule-based query optimizer for query processing; and
receiving information from the database management system that indicates which rules are exercised during the query processing.
2 Assignments
0 Petitions
Accused Products
Abstract
Described is a test framework for testing transformation rules of query optimizers. Rule patterns obtained as tree structures from a query optimizer are used to generate queries that are used to test the rule optimizer'"'"'s transformation rules. The test framework tracks which rules are exercised for each query, and also determines the correctness of the transformation rule by comparing the results of the query processing with the rule and without the rule (by turning off the rule). The test framework creates a composite pattern corresponding to two or more rules, such as to test rules in a set (e.g., as pairs). Also described is the efficient execution of a test suite for correctness testing, in which queries of the test suite are selected based upon cost information.
33 Citations
20 Claims
-
1. In a computing environment, a method performed on at least one processor comprising:
-
obtaining a rule pattern corresponding to a transformation rule of a transformation rule-based query optimizer of a database management system; generating a query based upon the rule pattern; providing the query to the transformation rule-based query optimizer for query processing; and receiving information from the database management system that indicates which rules are exercised during the query processing. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
- 12. In a computing environment, a system comprising, a test framework including a query generation component that generates queries based upon rule patterns received from a database management system that includes a query optimizer, the query optimizer configured to use transformation rules to optimize queries to be processed by the database management system, including queries received from the test framework, the test framework further including a correctness validation component that provides the queries to the query optimizer and validates whether results obtained from processing a query with a transformation rule that is exercised in query optimization match results obtained from processing the query without the transformation rule being exercised in query optimization.
-
19. One or more computer-readable media having computer-executable instructions, which when executed perform steps, comprising:
-
using rule patterns corresponding to transformation rules of a rule optimizer of a database management system to generate available queries; generating a test suite to test a set of transformation rules of a query optimizer, including selecting a subset of the available queries as the test suite to test the set of transformation rules based upon cost information; and for each query in the test suite; (a) providing the query to the rule optimizer for query processing; (b) receiving information from the database management system that indicates which rule or rules was exercised during the query processing; (c) receiving results from the query processing; (d) turning off one or more rules that were exercised; (e) providing the query to the rule optimizer for query processing with the one or more rules turned off; (f) receiving information from the database management system that indicates which rule or rules was exercised during the query processing with the one or more rules turned off; (g) receiving results from the query processing with the one or more rules turned off; and (h) determining whether the results obtained from processing the query with the one or more rules turned off match the results obtained from processing the query without the one or more rules turned off. - View Dependent Claims (20)
-
Specification