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

classic Classic list List threaded Threaded
36 messages Options
12
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
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


---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user chenliang613 commented on the issue:

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


---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user chenliang613 commented on the issue:

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


---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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" ?


---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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.


---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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


---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
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/



---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user chenliang613 commented on the issue:

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


---
Reply | Threaded
Open this post in threaded view
|

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

qiuchenjian-2
In reply to this post by qiuchenjian-2
Github user asfgit closed the pull request at:

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


---
12