Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1856 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/3203/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1856 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/3223/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1856 Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/1989/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/1856 SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/3182/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1856 Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/2004/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1856 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/3238/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/1856 SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/3194/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1856 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/3242/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1856 Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/2008/ --- |
In reply to this post by qiuchenjian-2
Github user ravipesala commented on the issue:
https://github.com/apache/carbondata/pull/1856 SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/3197/ --- |
In reply to this post by qiuchenjian-2
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1856#discussion_r164659399 --- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/integration/spark/testsuite/timeseries/TestTimeSeriesMatchStrategySuite.scala --- @@ -0,0 +1,294 @@ +/* + * 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.integration.spark.testsuite.timeseries + +import java.sql.Timestamp + +import org.apache.spark.sql.{CarbonDatasourceHadoopRelation, Row} +import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan +import org.apache.spark.sql.execution.datasources.LogicalRelation +import org.apache.spark.sql.hive.CarbonRelation +import org.apache.spark.sql.test.util.QueryTest +import org.apache.spark.util.SparkUtil4Test +import org.scalatest.{BeforeAndAfterAll, BeforeAndAfterEach} + +import org.apache.carbondata.core.constants.CarbonCommonConstants +import org.apache.carbondata.core.util.CarbonProperties + +class TestTimeSeriesMatchStrategySuite extends QueryTest with BeforeAndAfterAll with BeforeAndAfterEach { + + override def beforeAll: Unit = { + SparkUtil4Test.createTaskMockUp(sqlContext) + CarbonProperties.getInstance() + .addProperty(CarbonCommonConstants.CARBON_TIMESTAMP_FORMAT, + CarbonCommonConstants.CARBON_TIMESTAMP_DEFAULT_FORMAT) + + } + + override protected def beforeEach(): Unit = { + sql("drop table if exists mainTable") + sql( + """ + | CREATE TABLE mainTable( + | mytime timestamp, + | name string, + | age int) + | STORED BY 'org.apache.carbondata.format' + """.stripMargin) + sql(s"LOAD DATA LOCAL INPATH '$resourcesPath/timeseriestest.csv' into table mainTable") + } + + val timeSeries = "preaggregate" + + test("test timeseries match 1: select small size when there are >1 timeseries match") { + + dropDataMaps("maintable", "agg1_minute", "agg2_minute") + sql( + s""" + | create datamap agg1 on table mainTable + | using '$timeSeries' + | DMPROPERTIES ( + | 'timeseries.eventTime'='mytime', + | 'timeseries.hierarchy'='minute=1') + | as select mytime, sum(age), count(age), max(age), min(age) + | from mainTable + | group by mytime + """.stripMargin) + + val df1 = sql( + """ + | select + | timeseries(mytime,'minute') as minuteLevel, + | sum(age) as sum + | from mainTable + | where + | timeseries(mytime,'minute')<'2016-02-23 01:02:00' and + | timeseries(mytime,'minute')>='2016-02-23 01:01:00' + | group by + | timeseries(mytime,'minute') + | order by + | timeseries(mytime,'minute') + """.stripMargin) + + checkAnswer(df1, Seq(Row(Timestamp.valueOf("2016-02-23 01:01:00"), 60))) + + preAggTableValidator(df1.queryExecution.analyzed, "maintable_agg1_minute") + + sql( + s""" + | create datamap agg2 on table mainTable + | using '$timeSeries' + | DMPROPERTIES ( + | 'timeseries.eventTime'='mytime', + | 'timeseries.hierarchy'='minute=1') + | as select mytime, sum(age) + | from mainTable + | group by mytime + """.stripMargin) + + val df2 = sql( + """ + | select + | timeseries(mytime,'minute') as minuteLevel, + | sum(age) as sum + | from mainTable + | where + | timeseries(mytime,'minute')<'2016-02-23 01:02:00' and + | timeseries(mytime,'minute')>='2016-02-23 01:01:00' + | group by + | timeseries(mytime,'minute') + | order by + | timeseries(mytime,'minute') + """.stripMargin) + + checkAnswer(df2, Seq(Row(Timestamp.valueOf("2016-02-23 01:01:00"), 60))) + + preAggTableValidator(df2.queryExecution.analyzed, "maintable_agg2_minute") + } + + test("test timeseries match 2: select small size when there are >1 timeseries match") { + dropDataMaps("maintable", "agg1_minute", "agg2_minute") + sql( + s""" + | create datamap agg1 on table mainTable + | using '$timeSeries' + | DMPROPERTIES ( + | 'timeseries.eventTime'='mytime', + | 'timeseries.hierarchy'='minute=1') + | as select mytime, sum(age), count(age), max(age), min(age) + | from mainTable + | group by mytime + """.stripMargin) + + sql( + s""" + | create datamap agg2 on table mainTable + | using '$timeSeries' + | DMPROPERTIES ( + | 'timeseries.eventTime'='mytime', + | 'timeseries.hierarchy'='minute=1') + | as select mytime, sum(age) --- End diff -- should create this datamap first, and modify testcase title --- |
In reply to this post by qiuchenjian-2
Github user jackylk commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1856#discussion_r164660048 --- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/integration/spark/testsuite/timeseries/TestTimeSeriesMatchStrategySuite.scala --- @@ -0,0 +1,294 @@ +/* + * 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.integration.spark.testsuite.timeseries + +import java.sql.Timestamp + +import org.apache.spark.sql.{CarbonDatasourceHadoopRelation, Row} +import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan +import org.apache.spark.sql.execution.datasources.LogicalRelation +import org.apache.spark.sql.hive.CarbonRelation +import org.apache.spark.sql.test.util.QueryTest +import org.apache.spark.util.SparkUtil4Test +import org.scalatest.{BeforeAndAfterAll, BeforeAndAfterEach} + +import org.apache.carbondata.core.constants.CarbonCommonConstants +import org.apache.carbondata.core.util.CarbonProperties + +class TestTimeSeriesMatchStrategySuite extends QueryTest with BeforeAndAfterAll with BeforeAndAfterEach { + + override def beforeAll: Unit = { + SparkUtil4Test.createTaskMockUp(sqlContext) + CarbonProperties.getInstance() + .addProperty(CarbonCommonConstants.CARBON_TIMESTAMP_FORMAT, + CarbonCommonConstants.CARBON_TIMESTAMP_DEFAULT_FORMAT) + + } + + override protected def beforeEach(): Unit = { + sql("drop table if exists mainTable") + sql( + """ + | CREATE TABLE mainTable( + | mytime timestamp, + | name string, + | age int) + | STORED BY 'org.apache.carbondata.format' + """.stripMargin) + sql(s"LOAD DATA LOCAL INPATH '$resourcesPath/timeseriestest.csv' into table mainTable") + } + + val timeSeries = "preaggregate" + + test("test timeseries match 1: select small size when there are >1 timeseries match") { + + dropDataMaps("maintable", "agg1_minute", "agg2_minute") + sql( + s""" + | create datamap agg1 on table mainTable --- End diff -- change datamap name to big_agg --- |
In reply to this post by qiuchenjian-2
Github user xubo245 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1856#discussion_r165051297 --- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/integration/spark/testsuite/timeseries/TestTimeSeriesMatchStrategySuite.scala --- @@ -0,0 +1,294 @@ +/* + * 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.integration.spark.testsuite.timeseries + +import java.sql.Timestamp + +import org.apache.spark.sql.{CarbonDatasourceHadoopRelation, Row} +import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan +import org.apache.spark.sql.execution.datasources.LogicalRelation +import org.apache.spark.sql.hive.CarbonRelation +import org.apache.spark.sql.test.util.QueryTest +import org.apache.spark.util.SparkUtil4Test +import org.scalatest.{BeforeAndAfterAll, BeforeAndAfterEach} + +import org.apache.carbondata.core.constants.CarbonCommonConstants +import org.apache.carbondata.core.util.CarbonProperties + +class TestTimeSeriesMatchStrategySuite extends QueryTest with BeforeAndAfterAll with BeforeAndAfterEach { + + override def beforeAll: Unit = { + SparkUtil4Test.createTaskMockUp(sqlContext) + CarbonProperties.getInstance() + .addProperty(CarbonCommonConstants.CARBON_TIMESTAMP_FORMAT, + CarbonCommonConstants.CARBON_TIMESTAMP_DEFAULT_FORMAT) + + } + + override protected def beforeEach(): Unit = { + sql("drop table if exists mainTable") + sql( + """ + | CREATE TABLE mainTable( + | mytime timestamp, + | name string, + | age int) + | STORED BY 'org.apache.carbondata.format' + """.stripMargin) + sql(s"LOAD DATA LOCAL INPATH '$resourcesPath/timeseriestest.csv' into table mainTable") + } + + val timeSeries = "preaggregate" + + test("test timeseries match 1: select small size when there are >1 timeseries match") { + + dropDataMaps("maintable", "agg1_minute", "agg2_minute") + sql( + s""" + | create datamap agg1 on table mainTable + | using '$timeSeries' + | DMPROPERTIES ( + | 'timeseries.eventTime'='mytime', + | 'timeseries.hierarchy'='minute=1') + | as select mytime, sum(age), count(age), max(age), min(age) + | from mainTable + | group by mytime + """.stripMargin) + + val df1 = sql( + """ + | select + | timeseries(mytime,'minute') as minuteLevel, + | sum(age) as sum + | from mainTable + | where + | timeseries(mytime,'minute')<'2016-02-23 01:02:00' and + | timeseries(mytime,'minute')>='2016-02-23 01:01:00' + | group by + | timeseries(mytime,'minute') + | order by + | timeseries(mytime,'minute') + """.stripMargin) + + checkAnswer(df1, Seq(Row(Timestamp.valueOf("2016-02-23 01:01:00"), 60))) + + preAggTableValidator(df1.queryExecution.analyzed, "maintable_agg1_minute") + + sql( + s""" + | create datamap agg2 on table mainTable + | using '$timeSeries' + | DMPROPERTIES ( + | 'timeseries.eventTime'='mytime', + | 'timeseries.hierarchy'='minute=1') + | as select mytime, sum(age) + | from mainTable + | group by mytime + """.stripMargin) + + val df2 = sql( + """ + | select + | timeseries(mytime,'minute') as minuteLevel, + | sum(age) as sum + | from mainTable + | where + | timeseries(mytime,'minute')<'2016-02-23 01:02:00' and + | timeseries(mytime,'minute')>='2016-02-23 01:01:00' + | group by + | timeseries(mytime,'minute') + | order by + | timeseries(mytime,'minute') + """.stripMargin) + + checkAnswer(df2, Seq(Row(Timestamp.valueOf("2016-02-23 01:01:00"), 60))) + + preAggTableValidator(df2.queryExecution.analyzed, "maintable_agg2_minute") + } + + test("test timeseries match 2: select small size when there are >1 timeseries match") { + dropDataMaps("maintable", "agg1_minute", "agg2_minute") + sql( + s""" + | create datamap agg1 on table mainTable + | using '$timeSeries' + | DMPROPERTIES ( + | 'timeseries.eventTime'='mytime', + | 'timeseries.hierarchy'='minute=1') + | as select mytime, sum(age), count(age), max(age), min(age) + | from mainTable + | group by mytime + """.stripMargin) + + sql( + s""" + | create datamap agg2 on table mainTable + | using '$timeSeries' + | DMPROPERTIES ( + | 'timeseries.eventTime'='mytime', + | 'timeseries.hierarchy'='minute=1') + | as select mytime, sum(age) --- End diff -- ok, done --- |
In reply to this post by qiuchenjian-2
Github user xubo245 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1856#discussion_r165051330 --- Diff: integration/spark-common-test/src/test/scala/org/apache/carbondata/integration/spark/testsuite/timeseries/TestTimeSeriesMatchStrategySuite.scala --- @@ -0,0 +1,294 @@ +/* + * 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.integration.spark.testsuite.timeseries + +import java.sql.Timestamp + +import org.apache.spark.sql.{CarbonDatasourceHadoopRelation, Row} +import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan +import org.apache.spark.sql.execution.datasources.LogicalRelation +import org.apache.spark.sql.hive.CarbonRelation +import org.apache.spark.sql.test.util.QueryTest +import org.apache.spark.util.SparkUtil4Test +import org.scalatest.{BeforeAndAfterAll, BeforeAndAfterEach} + +import org.apache.carbondata.core.constants.CarbonCommonConstants +import org.apache.carbondata.core.util.CarbonProperties + +class TestTimeSeriesMatchStrategySuite extends QueryTest with BeforeAndAfterAll with BeforeAndAfterEach { + + override def beforeAll: Unit = { + SparkUtil4Test.createTaskMockUp(sqlContext) + CarbonProperties.getInstance() + .addProperty(CarbonCommonConstants.CARBON_TIMESTAMP_FORMAT, + CarbonCommonConstants.CARBON_TIMESTAMP_DEFAULT_FORMAT) + + } + + override protected def beforeEach(): Unit = { + sql("drop table if exists mainTable") + sql( + """ + | CREATE TABLE mainTable( + | mytime timestamp, + | name string, + | age int) + | STORED BY 'org.apache.carbondata.format' + """.stripMargin) + sql(s"LOAD DATA LOCAL INPATH '$resourcesPath/timeseriestest.csv' into table mainTable") + } + + val timeSeries = "preaggregate" + + test("test timeseries match 1: select small size when there are >1 timeseries match") { + + dropDataMaps("maintable", "agg1_minute", "agg2_minute") + sql( + s""" + | create datamap agg1 on table mainTable --- End diff -- ok,done --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1856 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/3355/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1856 Build Failed with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/2118/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1856 Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/3386/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1856 Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/2149/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1856 Build Success with Spark 2.2.1, Please check CI http://88.99.58.216:8080/job/ApacheCarbonPRBuilder/2164/ --- |
In reply to this post by qiuchenjian-2
Github user CarbonDataQA commented on the issue:
https://github.com/apache/carbondata/pull/1856 Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/3409/ --- |
Free forum by Nabble | Edit this page |