Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CARBONDATA-1579][PREAGG][DATAMAP] Support DataMap show #1490

Closed
wants to merge 1 commit into from

Conversation

ravipesala
Copy link
Contributor

Be sure to do all of the following checklist to help us incorporate
your contribution quickly and easily:
Added support for show datamap on table.

 SHOW DATAMAP ON TABLE test

The above command shows all datamaps on the table name test.
Output of it shows the following attributes

+-----------+---------+----------------+
|DataMapName|ClassName|Associated Table|
+-----------+---------+----------------+

This PR is dependent on the PRs #1481 and #1489 . First those PR need to be merged

  • Any interfaces changed?
    NO
  • Any backward compatibility impacted?
    NO
  • Document update required?
    Yes, sql command needs to be added to document
  • Testing done
    Tests are added
  • For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

@CarbonDataQA
Copy link

Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/1033/

@ravipesala
Copy link
Contributor Author

retest this please

@CarbonDataQA
Copy link

Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/1035/

@ravipesala
Copy link
Contributor Author

SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/1651/

@ravipesala
Copy link
Contributor Author

SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/1653/

val schemaList = carbonTable.getTableInfo.getDataMapSchemaList
if (schemaList != null && schemaList.size() > 0) {
schemaList.asScala.map { s =>
var table = "-NA-"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think (NA) is better

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@@ -142,6 +142,12 @@ class CarbonSpark2SqlParser extends CarbonDDLSqlParser {
CarbonDropDataMapCommand(dmname, ifexists.isDefined, dbName, tableName)
}

protected lazy val showDataMap: Parser[LogicalPlan] =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add syntax description

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

sql("create table datamapshowtest (a string, b string, c string) stored by 'carbondata'")
sql("create datamap datamap1 on table datamapshowtest using 'new.class' dmproperties('key'='value')")
sql("create datamap datamap2 on table datamapshowtest using 'new.class' dmproperties('key'='value')")
checkExistence(sql("show datamap on table datamapshowtest"), true, "datamap1", "datamap2", "-NA-", "new.class")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In output string, it should show datamapshowtest instead of -NA- for the table name, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it is NA only. The associated table available only for preaggregate datamaps

sql("create datamap datamap2 on table datamapshowtest using 'new.class' dmproperties('key'='value')")
checkExistence(sql("show datamap on table datamapshowtest"), true, "datamap1", "datamap2", "-NA-", "new.class", "default.datamap1")
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a testcase to show datamap on a table with no datamap

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a testcase to show datamap after dropping the datamap

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

@ravipesala ravipesala changed the base branch from pre-aggregate to master November 14, 2017 11:16
@CarbonDataQA
Copy link

Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/1110/

@CarbonDataQA
Copy link

Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/1113/

@ravipesala
Copy link
Contributor Author

SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/1709/

@jackylk
Copy link
Contributor

jackylk commented Nov 14, 2017

retest this please

@ravipesala
Copy link
Contributor Author

SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/1712/

@CarbonDataQA
Copy link

Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/1120/

@asfgit asfgit closed this in d062ab4 Nov 14, 2017
@jackylk
Copy link
Contributor

jackylk commented Nov 14, 2017

LGTM

jatin9896 pushed a commit to jatin9896/incubator-carbondata that referenced this pull request Jan 5, 2018
Added support for show datamap on table.

 SHOW DATAMAP ON TABLE test
The above command shows all datamaps on the table name test.

This closes apache#1490
anubhav100 pushed a commit to anubhav100/incubator-carbondata that referenced this pull request Jun 22, 2018
Added support for show datamap on table.

 SHOW DATAMAP ON TABLE test
The above command shows all datamaps on the table name test.

This closes apache#1490
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants