Drillers, We have a handful of tests in the drill test framework (Refer to [1] for some examples) which compare the text version of the plan to an expected result. The goal is to compare the structure of the text plan and also selected attributes of some operators ( Eg : numFiles, list of scanned files). The current implementation uses a regex based comparison where the QA person constructs an equivalent regex based expected file. This reduces the QA productivity and is not flexible w.r.t to moving parts in the plan. Any thoughts around this?
Few suggestions : 1. Run explain plan with a flag so that the text plan returned is deterministic and does not contain any moving parts. This version of the plan returned can contain the list of files scanned in an alphabetically sorted order or in some way which is deterministic. 2. Use the JSON plan and do an operator DAG based comparison. This can be very flexible. Even with this we still need to have some tests against the Text version of the plan. [1] https://github.com/mapr/drill-test-framework/tree/master/framework/resources/Functional/partition_pruning/dfs/csv/plan - Rahul
