Skip to content

Conversation

@adachij2002
Copy link
Contributor

SparkSQL CLI has an option --database as follows.
But, the option --database is ignored.

$ spark-sql --help
:
CLI options:
    :
    --database <databasename>     Specify the database to use

@rxin
Copy link
Contributor

rxin commented Apr 3, 2015

cc @liancheng

Jenkins, test this please.

@liancheng
Copy link
Contributor

@adachij2002 Would you mind to add a test case for this in CliSuite? We can pass --database <db> via extraArgs in runCliWithin there.

@adachij2002
Copy link
Contributor Author

@liancheng Thanks for your comment.
I've added a testcase.

@WangTaoTheTonic
Copy link
Contributor

Noticed that the permission is changed from 644 to 755:

sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala 100644 → 100755

Could you tell me why?

@adachij2002
Copy link
Contributor Author

@WangTaoTheTonic Sorry, I edited that file on Windows.
I restored the file permission from 755 to 644.

@marmbrus
Copy link
Contributor

ok to test

Copy link
Contributor

Choose a reason for hiding this comment

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

Why did this need to be moved out?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I need this test transactional.

  1. create database for test db by SparkSQL CLI.
  2. test --database option by SparkSQL command line.
    But the runCliWithin method will delete schema information.
    I modified to delete schema information in before/after of the test method.

@SparkQA
Copy link

SparkQA commented Apr 12, 2015

Test build #30099 has finished for PR 5345 at commit 846f83e.

  • This patch fails Scala style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.
  • This patch does not change any dependencies.

Copy link
Contributor

Choose a reason for hiding this comment

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

Please either use

def runCliWithin(
    timeout: FiniteDuration,
    extraArgs: Seq[String] = Seq.empty)(
    queriesAndExpectedAnswers: (String, String)*): Unit = {
  ...
}

or

def runCliWithin
    (timeout: FiniteDuration, extraArgs: Seq[String] = Seq.empty)
    (queriesAndExpectedAnswers: (String, String)*): Unit = {
  ...
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@liancheng I fixed it according to your suggestion.

@liancheng
Copy link
Contributor

retest this please.

@liancheng
Copy link
Contributor

The last Scala style check failure should be irrelevant.

Left a few minor styling comments. Otherwise this LGTM pending Jenkins. Thanks for working on this!

@SparkQA
Copy link

SparkQA commented Apr 13, 2015

Test build #30167 has finished for PR 5345 at commit 846f83e.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.
  • This patch does not change any dependencies.

@SparkQA
Copy link

SparkQA commented Apr 16, 2015

Test build #30392 has finished for PR 5345 at commit df81086.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.
  • This patch does not change any dependencies.

@SparkQA
Copy link

SparkQA commented Apr 16, 2015

Test build #30405 has finished for PR 5345 at commit 8659084.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.
  • This patch does not change any dependencies.

@liancheng
Copy link
Contributor

Thanks for working on this! Merging to master.

@asfgit asfgit closed this in 3ae37b9 Apr 16, 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.

6 participants