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

[Spark-7179][SQL]add tablenamepattern to hive sql of "show tables" #6745

Closed
wants to merge 4 commits into from

Conversation

baishuo
Copy link
Contributor

@baishuo baishuo commented Jun 10, 2015

the whole hive sql grammar of "show tables " is like "show tables [in databasename] [tablenamepattern]", "show tables [in databasename]" is already implement at spark sql component, and this PR implement "show tables [in databasename] tablenamepattern" at spark hive component

@@ -65,7 +65,7 @@ private[sql] class SparkSQLParser(fallback: String => LogicalPlan) extends Abstr
protected val TABLES = Keyword("TABLES")
protected val UNCACHE = Keyword("UNCACHE")

override protected lazy val start: Parser[LogicalPlan] = cache | uncache | set | show | others
override protected lazy val start: Parser[LogicalPlan] = cache ||| uncache ||| set ||| show ||| others
Copy link
Contributor

Choose a reason for hiding this comment

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

100 columns exceeded.

@SparkQA
Copy link

SparkQA commented Jun 10, 2015

Test build #34597 has finished for PR 6745 at commit 56ac537.

  • This patch fails Scala style tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class ShowTablesCommand(databaseName: Option[String], pattern: Option[String]) extends RunnableCommand


private lazy val showInHive: Parser[LogicalPlan] =
SHOW ~ TABLES ~> (IN ~> ident).? ~ opt(stringLit) ^^ {
case dbName ~ reg => ShowTablesCommand(dbName, reg)
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Please rename reg to regexPattern.

@liancheng
Copy link
Contributor

This change generally looks good except for some styling issues. Thanks for working on this!

@baishuo
Copy link
Contributor Author

baishuo commented Jun 11, 2015

@liancheng thank you for review this PR, had modify the style :)

@SparkQA
Copy link

SparkQA commented Jun 11, 2015

Test build #34661 has finished for PR 6745 at commit 4b549e3.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class ShowTablesCommand(

@SparkQA
Copy link

SparkQA commented Jun 11, 2015

Test build #34667 has finished for PR 6745 at commit 5a8a0df.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class ShowTablesCommand(

@andrewor14
Copy link
Contributor

@baishuo @liancheng any updates on this? Is this patch still active?

@baishuo
Copy link
Contributor Author

baishuo commented Sep 8, 2015

hi @andrewor14 @liancheng , This patch didnt pass some test. And I didnt find way to resolve it :)

@asfgit asfgit closed this in 93b52ab Dec 31, 2015
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.

4 participants