[GitHub] carbondata pull request #2015: [CARBONDATA-2103]Make show datamaps configura...

2018-03-02 Thread asfgit
Github user asfgit closed the pull request at:

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


---


[GitHub] carbondata pull request #2015: [CARBONDATA-2103]Make show datamaps configura...

2018-02-28 Thread akashrn5
Github user akashrn5 commented on a diff in the pull request:

https://github.com/apache/carbondata/pull/2015#discussion_r171246980
  
--- Diff: 
integration/spark-common-test/src/test/scala/org/apache/carbondata/integration/spark/testsuite/preaggregate/TestPreAggCreateCommand.scala
 ---
@@ -377,11 +379,15 @@ class TestPreAggCreateCommand extends QueryTest with 
BeforeAndAfterAll {
 sql("DROP DATAMAP IF EXISTS agg0 ON TABLE maintable")
   }
 
-  test("test show tables filterted with datamaps"){
+  test("test show tables filterted with datamaps") {
+
CarbonProperties.getInstance().addProperty(CarbonCommonConstants.CARBON_SHOW_DATAMAPS,"false")
 sql("create table showTables(name string, age int) stored by 
'carbondata'")
-sql("create datamap preAgg on table showTables using 'preaggregate' as 
select sum(age) from showTables")
+sql(
+  "create datamap preAgg on table showTables using 'preaggregate' as 
select sum(age) from showTables")
 sql("show tables").show()
-assert(!sql("show tables").collect().contains("showTables_preagg"))
+checkExistence(sql("show tables"), false, "showtables_preagg")
+
CarbonProperties.getInstance().addProperty(CarbonCommonConstants.CARBON_SHOW_DATAMAPS,CarbonCommonConstants.CARBON_SHOW_DATAMAPS_DEFAULT)
--- End diff --

reset the property to default in afterAll() block


---


[GitHub] carbondata pull request #2015: [CARBONDATA-2103]Make show datamaps configura...

2018-02-28 Thread ravipesala
Github user ravipesala commented on a diff in the pull request:

https://github.com/apache/carbondata/pull/2015#discussion_r171243483
  
--- Diff: 
integration/spark-common-test/src/test/scala/org/apache/carbondata/integration/spark/testsuite/preaggregate/TestPreAggCreateCommand.scala
 ---
@@ -377,11 +379,15 @@ class TestPreAggCreateCommand extends QueryTest with 
BeforeAndAfterAll {
 sql("DROP DATAMAP IF EXISTS agg0 ON TABLE maintable")
   }
 
-  test("test show tables filterted with datamaps"){
+  test("test show tables filterted with datamaps") {
+
CarbonProperties.getInstance().addProperty(CarbonCommonConstants.CARBON_SHOW_DATAMAPS,"false")
 sql("create table showTables(name string, age int) stored by 
'carbondata'")
-sql("create datamap preAgg on table showTables using 'preaggregate' as 
select sum(age) from showTables")
+sql(
+  "create datamap preAgg on table showTables using 'preaggregate' as 
select sum(age) from showTables")
 sql("show tables").show()
-assert(!sql("show tables").collect().contains("showTables_preagg"))
+checkExistence(sql("show tables"), false, "showtables_preagg")
+
CarbonProperties.getInstance().addProperty(CarbonCommonConstants.CARBON_SHOW_DATAMAPS,CarbonCommonConstants.CARBON_SHOW_DATAMAPS_DEFAULT)
--- End diff --

Keep it finally block


---


[GitHub] carbondata pull request #2015: [CARBONDATA-2103]Make show datamaps configura...

2018-02-28 Thread akashrn5
GitHub user akashrn5 opened a pull request:

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

[CARBONDATA-2103]Make show datamaps configurable in show tables command

Be sure to do all of the following checklist to help us incorporate 
your contribution quickly and easily:

 - [x] Any interfaces changed?
 NA
 - [x] Any backward compatibility impacted?
 NA
 - [x] Document update required?
Yes
 - [x] Testing done
added UT
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.
   
 - [X] For large changes, please consider breaking it into sub-tasks under 
an umbrella JIRA. 
NA


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

$ git pull https://github.com/akashrn5/incubator-carbondata show

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

https://github.com/apache/carbondata/pull/2015.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 #2015


commit 91c630c461069f9bf1558350f8ae67029241e712
Author: akashrn5 
Date:   2018-02-28T12:08:50Z

fix show tables in case of any exception while filtering datamaps




---