You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by ravipesala <gi...@git.apache.org> on 2018/08/07 11:28:33 UTC

[GitHub] carbondata pull request #2614: [CARBONDATA-2837] Added MVExample in example ...

GitHub user ravipesala opened a pull request:

    https://github.com/apache/carbondata/pull/2614

    [CARBONDATA-2837] Added MVExample in example module

    Added MVExample in example module
    
    Be sure to do all of the following checklist to help us incorporate 
    your contribution quickly and easily:
    
     - [ ] Any interfaces changed?
     
     - [ ] Any backward compatibility impacted?
     
     - [ ] Document update required?
    
     - [ ] Testing done
            Please provide details on 
            - Whether new unit test cases have been added or why no new tests are required?
            - How it is tested? Please attach test report.
            - Is it a performance related change? Please attach the performance test report.
            - Any additional information to help reviewers in testing this change.
           
     - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA. 
    


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

    $ git pull https://github.com/ravipesala/incubator-carbondata mvexample

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

    https://github.com/apache/carbondata/pull/2614.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 #2614
    
----
commit f50e72201dd1d0da720bcfaf68c5e4df14a51624
Author: ravipesala <ra...@...>
Date:   2018-08-07T11:07:17Z

    Added MVExample

----


---

[GitHub] carbondata issue #2614: [CARBONDATA-2837] Added MVExample in example module

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

    https://github.com/apache/carbondata/pull/2614
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/8217/



---

[GitHub] carbondata issue #2614: [CARBONDATA-2837] Added MVExample in example module

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

    https://github.com/apache/carbondata/pull/2614
  
    Build Failed with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/119/



---

[GitHub] carbondata issue #2614: [CARBONDATA-2837] Added MVExample in example module

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

    https://github.com/apache/carbondata/pull/2614
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7818/



---

[GitHub] carbondata issue #2614: [CARBONDATA-2837] Added MVExample in example module

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

    https://github.com/apache/carbondata/pull/2614
  
    retest this please


---

[GitHub] carbondata issue #2614: [CARBONDATA-2837] Added MVExample in example module

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

    https://github.com/apache/carbondata/pull/2614
  
    Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6726/



---

[GitHub] carbondata issue #2614: [CARBONDATA-2837] Added MVExample in example module

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

    https://github.com/apache/carbondata/pull/2614
  
    Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6542/



---

[GitHub] carbondata issue #2614: [CARBONDATA-2837] Added MVExample in example module

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

    https://github.com/apache/carbondata/pull/2614
  
    retest this please


---

[GitHub] carbondata issue #2614: [CARBONDATA-2837] Added MVExample in example module

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

    https://github.com/apache/carbondata/pull/2614
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/8231/



---

[GitHub] carbondata issue #2614: [CARBONDATA-2837] Added MVExample in example module

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

    https://github.com/apache/carbondata/pull/2614
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/8190/



---

[GitHub] carbondata pull request #2614: [CARBONDATA-2837] Added MVExample in example ...

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

    https://github.com/apache/carbondata/pull/2614#discussion_r208206503
  
    --- Diff: examples/spark2/pom.xml ---
    @@ -49,6 +49,11 @@
           <artifactId>carbondata-store-sdk</artifactId>
           <version>${project.version}</version>
         </dependency>
    +    <dependency>
    +      <groupId>org.apache.carbondata</groupId>
    +      <artifactId>carbondata-mv-core</artifactId>
    --- End diff --
    
    This is adding always or in case of `mv` profile is selected?


---

[GitHub] carbondata pull request #2614: [CARBONDATA-2837] Added MVExample in example ...

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

    https://github.com/apache/carbondata/pull/2614#discussion_r214526743
  
    --- Diff: examples/spark2/src/main/scala/org/apache/carbondata/examples/MVDataMapExample.scala ---
    @@ -0,0 +1,125 @@
    +/*
    + * 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.carbondata.examples
    +
    +import java.io.File
    +
    +import org.apache.spark.sql.SparkSession
    +
    +import org.apache.carbondata.examples.util.ExampleUtils
    +
    +/**
    + * This example is for pre-aggregate tables.
    + */
    +
    +object MVDataMapExample {
    +
    +  def main(args: Array[String]) {
    +    val spark = ExampleUtils.createCarbonSession("MVDataMapExample")
    +    exampleBody(spark)
    +    spark.close()
    +  }
    +
    +  def exampleBody(spark: SparkSession): Unit = {
    +    val rootPath = new File(this.getClass.getResource("/").getPath
    +                            + "../../../..").getCanonicalPath
    +    val testData = s"$rootPath/integration/spark-common-test/src/test/resources/sample.csv"
    +
    +    // 1. simple usage for Pre-aggregate tables creation and query
    +    spark.sql("DROP TABLE IF EXISTS mainTable")
    +    spark.sql("DROP TABLE IF EXISTS dimtable")
    +    spark.sql(
    +      """
    +        | CREATE TABLE mainTable
    +        | (id Int,
    +        | name String,
    +        | city String,
    +        | age Int)
    +        | STORED BY 'org.apache.carbondata.format'
    +      """.stripMargin)
    +
    +    spark.sql(
    +      """
    +        | CREATE TABLE dimtable
    +        | (name String,
    +        | address String)
    +        | STORED BY 'org.apache.carbondata.format'
    +      """.stripMargin)
    +
    +    spark.sql(s"""LOAD DATA LOCAL INPATH '$testData' into table mainTable""")
    +
    +    spark.sql(s"""insert into dimtable select name, concat(city, ' street1') as address from
    +           |mainTable group by name, address""".stripMargin)
    --- End diff --
    
    Why need to add "group by name ,address" ?


---

[GitHub] carbondata pull request #2614: [CARBONDATA-2837] Added MVExample in example ...

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

    https://github.com/apache/carbondata/pull/2614#discussion_r214529711
  
    --- Diff: examples/spark2/src/main/scala/org/apache/carbondata/examples/MVDataMapExample.scala ---
    @@ -0,0 +1,125 @@
    +/*
    + * 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.carbondata.examples
    +
    +import java.io.File
    +
    +import org.apache.spark.sql.SparkSession
    +
    +import org.apache.carbondata.examples.util.ExampleUtils
    +
    +/**
    + * This example is for pre-aggregate tables.
    + */
    +
    +object MVDataMapExample {
    +
    +  def main(args: Array[String]) {
    +    val spark = ExampleUtils.createCarbonSession("MVDataMapExample")
    +    exampleBody(spark)
    +    spark.close()
    +  }
    +
    +  def exampleBody(spark: SparkSession): Unit = {
    +    val rootPath = new File(this.getClass.getResource("/").getPath
    +                            + "../../../..").getCanonicalPath
    +    val testData = s"$rootPath/integration/spark-common-test/src/test/resources/sample.csv"
    +
    +    // 1. simple usage for Pre-aggregate tables creation and query
    +    spark.sql("DROP TABLE IF EXISTS mainTable")
    +    spark.sql("DROP TABLE IF EXISTS dimtable")
    +    spark.sql(
    +      """
    +        | CREATE TABLE mainTable
    +        | (id Int,
    +        | name String,
    +        | city String,
    +        | age Int)
    +        | STORED BY 'org.apache.carbondata.format'
    +      """.stripMargin)
    +
    +    spark.sql(
    +      """
    +        | CREATE TABLE dimtable
    +        | (name String,
    +        | address String)
    +        | STORED BY 'org.apache.carbondata.format'
    +      """.stripMargin)
    +
    +    spark.sql(s"""LOAD DATA LOCAL INPATH '$testData' into table mainTable""")
    +
    +    spark.sql(s"""insert into dimtable select name, concat(city, ' street1') as address from
    +           |mainTable group by name, address""".stripMargin)
    --- End diff --
    
    It is for removing duplicates while insert into dimension table


---

[GitHub] carbondata issue #2614: [CARBONDATA-2837] Added MVExample in example module

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

    https://github.com/apache/carbondata/pull/2614
  
    Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/6688/



---

[GitHub] carbondata issue #2614: [CARBONDATA-2837] Added MVExample in example module

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

    https://github.com/apache/carbondata/pull/2614
  
    retest this please


---

[GitHub] carbondata issue #2614: [CARBONDATA-2837] Added MVExample in example module

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

    https://github.com/apache/carbondata/pull/2614
  
    Build Failed with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/153/



---

[GitHub] carbondata issue #2614: [CARBONDATA-2837] Added MVExample in example module

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

    https://github.com/apache/carbondata/pull/2614
  
    Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/160/



---

[GitHub] carbondata issue #2614: [CARBONDATA-2837] Added MVExample in example module

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

    https://github.com/apache/carbondata/pull/2614
  
    Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/67/



---

[GitHub] carbondata issue #2614: [CARBONDATA-2837] Added MVExample in example module

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

    https://github.com/apache/carbondata/pull/2614
  
    Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/158/



---

[GitHub] carbondata issue #2614: [CARBONDATA-2837] Added MVExample in example module

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

    https://github.com/apache/carbondata/pull/2614
  
    retest this please


---

[GitHub] carbondata issue #2614: [CARBONDATA-2837] Added MVExample in example module

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

    https://github.com/apache/carbondata/pull/2614
  
    SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/6194/



---

[GitHub] carbondata issue #2614: [CARBONDATA-2837] Added MVExample in example module

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

    https://github.com/apache/carbondata/pull/2614
  
    Build Success with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/146/



---

[GitHub] carbondata issue #2614: [CARBONDATA-2837] Added MVExample in example module

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

    https://github.com/apache/carbondata/pull/2614
  
    retest this please


---

[GitHub] carbondata issue #2614: [CARBONDATA-2837] Added MVExample in example module

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

    https://github.com/apache/carbondata/pull/2614
  
    Build Failed with Spark 2.2.1, Please check CI http://95.216.28.178:8080/job/ApacheCarbonPRBuilder1/10/



---

[GitHub] carbondata issue #2614: [CARBONDATA-2837] Added MVExample in example module

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

    https://github.com/apache/carbondata/pull/2614
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/8003/



---

[GitHub] carbondata issue #2614: [CARBONDATA-2837] Added MVExample in example module

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

    https://github.com/apache/carbondata/pull/2614
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/7964/



---

[GitHub] carbondata issue #2614: [CARBONDATA-2837] Added MVExample in example module

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

    https://github.com/apache/carbondata/pull/2614
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/8138/



---

[GitHub] carbondata issue #2614: [CARBONDATA-2837] Added MVExample in example module

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

    https://github.com/apache/carbondata/pull/2614
  
    LGTM


---

[GitHub] carbondata pull request #2614: [CARBONDATA-2837] Added MVExample in example ...

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

    https://github.com/apache/carbondata/pull/2614


---

[GitHub] carbondata issue #2614: [CARBONDATA-2837] Added MVExample in example module

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

    https://github.com/apache/carbondata/pull/2614
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/8229/



---

[GitHub] carbondata pull request #2614: [CARBONDATA-2837] Added MVExample in example ...

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

    https://github.com/apache/carbondata/pull/2614#discussion_r214504621
  
    --- Diff: examples/spark2/pom.xml ---
    @@ -49,6 +49,11 @@
           <artifactId>carbondata-store-sdk</artifactId>
           <version>${project.version}</version>
         </dependency>
    +    <dependency>
    +      <groupId>org.apache.carbondata</groupId>
    +      <artifactId>carbondata-mv-core</artifactId>
    --- End diff --
    
    Yes, profile added


---

[GitHub] carbondata issue #2614: [CARBONDATA-2837] Added MVExample in example module

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

    https://github.com/apache/carbondata/pull/2614
  
    two comments  : 
    1.In this example, suggest listing all typical cases which be supported currently and put the performance comparison, how to improve the performance after creating mv datamap.
    2.Don't need add this example to CI, because the 1st comment, there are many performance comparison.


---

[GitHub] carbondata issue #2614: [CARBONDATA-2837] Added MVExample in example module

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

    https://github.com/apache/carbondata/pull/2614
  
    retest this please


---

[GitHub] carbondata issue #2614: [CARBONDATA-2837] Added MVExample in example module

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

    https://github.com/apache/carbondata/pull/2614
  
    retest this please


---

[GitHub] carbondata issue #2614: [CARBONDATA-2837] Added MVExample in example module

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

    https://github.com/apache/carbondata/pull/2614
  
    Build Failed  with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/8068/



---

[GitHub] carbondata issue #2614: [CARBONDATA-2837] Added MVExample in example module

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

    https://github.com/apache/carbondata/pull/2614
  
    Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/8224/



---