You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gearpump.apache.org by buddhiayesha2015 <gi...@git.apache.org> on 2017/09/18 02:27:20 UTC

[GitHub] incubator-gearpump pull request #225: [GEARPUMP-217] Convert into unit tests

GitHub user buddhiayesha2015 opened a pull request:

    https://github.com/apache/incubator-gearpump/pull/225

    [GEARPUMP-217] Convert into unit tests

    Be sure to do all of the following to help us incorporate your contribution
    quickly and easily:
    
     - [ ] Make sure the commit message is formatted like:
       `[GEARPUMP-<Jira issue #>] Meaningful description of pull request` 
     - [ ] Make sure tests pass via `sbt clean test`.
     - [ ] Make sure old documentation affected by the pull request has been updated and new documentation added for new functionality. 
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/BuddhiAR/incubator-gearpump master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-gearpump/pull/225.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #225
    
----
commit d83d3556206b7e1fcf2a799af492e89d6a69f779
Author: Buddhi Ayesha <bu...@cse.mrt.ac.lk>
Date:   2017-09-17T19:41:49Z

    [GEARPUMP-217] Convert into unit tests

----


---

[GitHub] incubator-gearpump pull request #225: [GEARPUMP-217] Convert into unit tests

Posted by manuzhang <gi...@git.apache.org>.
Github user manuzhang commented on a diff in the pull request:

    https://github.com/apache/incubator-gearpump/pull/225#discussion_r139435394
  
    --- Diff: experiments/sql/src/test/java/org/apache/gearpump/sql/planner/CalciteTest.java ---
    @@ -291,17 +290,25 @@ void calTest() throws SqlParseException {
           cluster,
           convertletTable);
         RelRoot root = sqlToRelConverter.convertQuery(validatedSqlNode, false, true);
    -    System.out.println(RelOptUtil.toString(root.rel));
    +    // Check logical plan
    +    String expectedResult = "LogicalProject(product_id=[$0], product_name=[$1], order_id=[$2])" +
    +      "  LogicalFilter(condition=[>($3, 2)])" +
    +      "    LogicalProject(id=[$0], name=[$1], id1=[$3], quantity=[$4])" +
    +      "      LogicalJoin(condition=[=($2, $5)], joinType=[inner])" +
    +      "        LogicalProject(id=[$0], name=[$1], id0=[CAST($0):VARCHAR CHARACTER SET \"ISO-8859-1\" COLLATE \"" +
    +      "ISO-8859-1$en_US$primary\"])" +
    +      "          EnumerableTableScan(table=[[t, products]])" +
    +      "        LogicalProject(id=[$0], quantity=[$1], id0=[CAST($0):VARCHAR CHARACTER SET \"ISO-8859-1\" COLLATE \"" +
    +      "ISO-8859-1$en_US$primary\"])" +
    +      "          EnumerableTableScan(table=[[t, orders]])";
    +    assertEquals(expectedResult,
    --- End diff --
    
    What's the usage of codes below this ?


---

[GitHub] incubator-gearpump pull request #225: [GEARPUMP-217] Convert into unit tests

Posted by manuzhang <gi...@git.apache.org>.
Github user manuzhang commented on a diff in the pull request:

    https://github.com/apache/incubator-gearpump/pull/225#discussion_r139435162
  
    --- Diff: experiments/sql/src/test/java/org/apache/gearpump/sql/planner/CalciteTest.java ---
    @@ -80,19 +80,38 @@
       private RexExecutor executor;
       private RelRoot root;
     
    -  public CalciteTest(FrameworkConfig config) {
    -    this.config = config;
    -    this.defaultSchema = config.getDefaultSchema();
    -    this.operatorTable = config.getOperatorTable();
    -    this.parserConfig = config.getParserConfig();
    -    this.state = State.STATE_0_CLOSED;
    -    this.traitDefs = config.getTraitDefs();
    -    this.convertletTable = config.getConvertletTable();
    -    this.executor = config.getExecutor();
    +  @Before
    +  public void setFrameworkConfig() throws ClassNotFoundException, SQLException {
    +
    +    Class.forName("org.apache.calcite.jdbc.Driver");
    --- End diff --
    
    Is this used ?


---

[GitHub] incubator-gearpump pull request #225: [GEARPUMP-217] Convert into unit tests

Posted by buddhiayesha2015 <gi...@git.apache.org>.
Github user buddhiayesha2015 closed the pull request at:

    https://github.com/apache/incubator-gearpump/pull/225


---

[GitHub] incubator-gearpump issue #225: [GEARPUMP-217] Convert into unit tests

Posted by codecov-io <gi...@git.apache.org>.
Github user codecov-io commented on the issue:

    https://github.com/apache/incubator-gearpump/pull/225
  
    # [Codecov](https://codecov.io/gh/apache/incubator-gearpump/pull/225?src=pr&el=h1) Report
    > Merging [#225](https://codecov.io/gh/apache/incubator-gearpump/pull/225?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-gearpump/commit/55d6d2f5660af7b52668cfdfcdd4d92fc76f67a3?src=pr&el=desc) will **increase** coverage by `0.18%`.
    > The diff coverage is `n/a`.
    
    
    
    ```diff
    @@            Coverage Diff             @@
    ##           master     #225      +/-   ##
    ==========================================
    + Coverage   68.97%   69.15%   +0.18%     
    ==========================================
      Files         191      191              
      Lines        6105     6105              
      Branches      362      362              
    ==========================================
    + Hits         4211     4222      +11     
    + Misses       1894     1883      -11
    ```
    



---