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
Conversation
Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/1033/ |
retest this please |
Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/1035/ |
SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/1651/ |
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-" |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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] = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add syntax description
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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") | ||
} | ||
|
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/1110/ |
dd1ee26
to
9fb3c9e
Compare
Build Failed with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/1113/ |
SDV Build Fail , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/1709/ |
retest this please |
SDV Build Success , Please check CI http://144.76.159.231:8080/job/ApacheSDVTests/1712/ |
Build Success with Spark 2.1.0, Please check CI http://136.243.101.176:8080/job/ApacheCarbonPRBuilder1/1120/ |
LGTM |
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
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
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.
The above command shows all datamaps on the table name test.
Output of it shows the following attributes
This PR is dependent on the PRs #1481 and #1489 . First those PR need to be merged
NO
NO
Yes, sql command needs to be added to document
Tests are added