drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-5783) Make code generation in the TopN operator more modular and test it
Date Wed, 18 Oct 2017 22:24:03 GMT

    [ https://issues.apache.org/jira/browse/DRILL-5783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16210163#comment-16210163

ASF GitHub Bot commented on DRILL-5783:

Github user paul-rogers commented on a diff in the pull request:

    --- Diff: exec/java-exec/src/test/java/org/apache/drill/TestAltSortQueries.java ---
    @@ -19,24 +19,33 @@
     import org.apache.drill.categories.OperatorTest;
     import org.apache.drill.categories.SqlTest;
    +import org.apache.drill.test.BaseTestQuery;
    +import org.junit.BeforeClass;
     import org.junit.Test;
     import org.junit.experimental.categories.Category;
     @Category({SqlTest.class, OperatorTest.class})
    -public class TestAltSortQueries extends BaseTestQuery{
    +public class TestAltSortQueries extends BaseTestQuery {
       static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TestAltSortQueries.class);
    +  @BeforeClass
    +  public static void setupTestFiles() {
    +    dirTestWatcher.copyFileToRoot("sample-data/region.parquet");
    +    dirTestWatcher.copyFileToRoot("sample-data/regionsSF");
    +    dirTestWatcher.copyFileToRoot("sample-data/nation.parquet");
    +  }
       public void testOrderBy() throws Exception{
         test("select R_REGIONKEY " +
    -         "from dfs_test.`[WORKING_PATH]/../../sample-data/region.parquet` " +
    +         "from dfs_test.`/sample-data/region.parquet` " +
    --- End diff --
    I like this improvement. Here we created files just for this one test. You are using a
workspace to point to those files. Do so avoids the need to doctor up the strings.
    Is `dfs_test` setup to point to the per-query root directory? Seems to be.
    Since I have to ask these questions, would be good to explain in the `...drill.test` `package-info.java`
file how to set up temporary files and the mapping of workspaces to these directories. That
will allow others to readily use the mechanism. Otherwise, people will guess, and will go
back to using what is familiar. See `ExampleTest.java` for an example of a "starter" file
to help people get started.
    In fact, maybe we would add a new example test to that file that shows how to create a
test-specific data file and query that file. (That would sure help me...)

> Make code generation in the TopN operator more modular and test it
> ------------------------------------------------------------------
>                 Key: DRILL-5783
>                 URL: https://issues.apache.org/jira/browse/DRILL-5783
>             Project: Apache Drill
>          Issue Type: Improvement
>            Reporter: Timothy Farkas
>            Assignee: Timothy Farkas

This message was sent by Atlassian JIRA

View raw message