arina-ielchiieva commented on a change in pull request #1914: DRILL-7458: Base framework for storage plugins URL: https://github.com/apache/drill/pull/1914#discussion_r369428809
########## File path: exec/java-exec/src/test/java/org/apache/drill/exec/store/base/PlanVerifier.java ########## @@ -0,0 +1,146 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.drill.exec.store.base; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.fail; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.io.PrintWriter; +import java.io.Reader; +import java.io.StringReader; +import java.net.URL; + +import org.apache.drill.test.ClientFixture; + +/** + * Verifier for execution plans. A handy tool to ensure that the + * planner produces the expected plan given some set of conditions. + * <p> + * The test works by comparing the actual {@code EXPLAIN} output + * to a "golden" file with the expected ("golden") plan. + * <p> + * To create a test, just write it and let it fail due to a missing file. + * The output will go to the console. Inspect it. If it looks good, + * copy the plan to the golden file and run again. + * <p> + * If comparison fails, you can optionally ask the verifier to write the + * output to {@code /tmp} so you can compare the golden and actual Review comment: ```suggestion * output to {@code /tmp/drill/test} so you can compare the golden and actual ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services