You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by adachij2002 <gi...@git.apache.org> on 2015/04/03 10:22:37 UTC

[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

GitHub user adachij2002 opened a pull request:

    https://github.com/apache/spark/pull/5345

    [SPARK-6694][SQL]SparkSQL CLI must be able to specify an option --database on the command line.

    SparkSQL CLI has an option --database as follows.
    But, an option --database doesn't work properly.
    
    ```
    $ spark-sql --help
    :
    CLI options:
        :
        --database <databasename>     Specify the database to use
    ```

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

    $ git pull https://github.com/adachij2002/spark SPARK-6694

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

    https://github.com/apache/spark/pull/5345.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 #5345
    
----
commit c804c03fa21612597b059e521d7e50fcf6ccfce5
Author: adachij <ad...@nttdata.co.jp>
Date:   2015-04-03T08:17:46Z

    SparkSQL CLI must be able to specify an option --database on the command line.

commit ee09fa5ecfe85ed636bbb42a23d3f8ee3709b9a5
Author: adachij <ad...@nttdata.co.jp>
Date:   2015-04-03T08:19:13Z

    Merge branch 'master' into SPARK-6694

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/spark/pull/5345


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by WangTaoTheTonic <gi...@git.apache.org>.
Github user WangTaoTheTonic commented on the pull request:

    https://github.com/apache/spark/pull/5345#issuecomment-90374203
  
    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?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by adachij2002 <gi...@git.apache.org>.
Github user adachij2002 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5345#discussion_r28481231
  
    --- Diff: sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/CliSuite.scala ---
    @@ -26,22 +26,32 @@ import scala.concurrent.{Await, Promise}
     import scala.sys.process.{Process, ProcessLogger}
     
     import org.apache.hadoop.hive.conf.HiveConf.ConfVars
    -import org.scalatest.{BeforeAndAfterAll, FunSuite}
    +import org.scalatest.{BeforeAndAfter, BeforeAndAfterAll, FunSuite}
     
     import org.apache.spark.Logging
     import org.apache.spark.util.Utils
     
    -class CliSuite extends FunSuite with BeforeAndAfterAll with Logging {
    +class CliSuite extends FunSuite with BeforeAndAfter with BeforeAndAfterAll with Logging {
    --- End diff --
    
    @liancheng I fixed it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by liancheng <gi...@git.apache.org>.
Github user liancheng commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5345#discussion_r28239774
  
    --- Diff: sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/CliSuite.scala ---
    @@ -125,4 +133,23 @@ class CliSuite extends FunSuite with BeforeAndAfterAll with Logging {
       test("Single command with -e") {
         runCliWithin(1.minute, Seq("-e", "SHOW DATABASES;"))("" -> "OK")
       }
    +
    +  test("Single command with --database") {
    +    runCliWithin(1.minute)(
    --- End diff --
    
    Please use `{ ... }` rather than `( ... )` for the `queriesAndExpectedAnswers` argument.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:

    https://github.com/apache/spark/pull/5345#issuecomment-89219002
  
    cc @liancheng
    
    Jenkins, test this please.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by liancheng <gi...@git.apache.org>.
Github user liancheng commented on the pull request:

    https://github.com/apache/spark/pull/5345#issuecomment-93766530
  
    Thanks for working on this! Merging to master.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by liancheng <gi...@git.apache.org>.
Github user liancheng commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5345#discussion_r28239813
  
    --- Diff: sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/CliSuite.scala ---
    @@ -125,4 +133,23 @@ class CliSuite extends FunSuite with BeforeAndAfterAll with Logging {
       test("Single command with -e") {
         runCliWithin(1.minute, Seq("-e", "SHOW DATABASES;"))("" -> "OK")
       }
    +
    +  test("Single command with --database") {
    +    runCliWithin(1.minute)(
    +      "CREATE DATABASE hive_test_db;"
    +        -> "OK",
    +      "USE hive_test_db;"
    +        -> "OK",
    +      "CREATE TABLE hive_test(key INT, val STRING);"
    +        -> "OK",
    +      "SHOW TABLES;"
    +        -> "Time taken: "
    +    )
    --- End diff --
    
    A new line here.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/5345#issuecomment-93624847
  
      [Test build #30392 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/30392/consoleFull) for   PR 5345 at commit [`df81086`](https://github.com/apache/spark/commit/df81086aa84b969e6e2c1cb6c9938aaeaf70dd30).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/5345#issuecomment-93663433
  
      [Test build #30405 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/30405/consoleFull) for   PR 5345 at commit [`8659084`](https://github.com/apache/spark/commit/8659084a9cfc4ec4b7cdc31dc330cd1834ea5492).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by adachij2002 <gi...@git.apache.org>.
Github user adachij2002 commented on the pull request:

    https://github.com/apache/spark/pull/5345#issuecomment-90391257
  
    Sorry, I edited that file on Windows.
    I changed the file permission from 755 to 644.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by marmbrus <gi...@git.apache.org>.
Github user marmbrus commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5345#discussion_r28200004
  
    --- Diff: sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/CliSuite.scala ---
    @@ -26,22 +26,32 @@ import scala.concurrent.{Await, Promise}
     import scala.sys.process.{Process, ProcessLogger}
     
     import org.apache.hadoop.hive.conf.HiveConf.ConfVars
    -import org.scalatest.{BeforeAndAfterAll, FunSuite}
    +import org.scalatest.{BeforeAndAfter, BeforeAndAfterAll, FunSuite}
     
     import org.apache.spark.Logging
     import org.apache.spark.util.Utils
     
    -class CliSuite extends FunSuite with BeforeAndAfterAll with Logging {
    +class CliSuite extends FunSuite with BeforeAndAfter with BeforeAndAfterAll with Logging {
    +  val warehousePath = Utils.createTempDir()
    +  val metastorePath = Utils.createTempDir()
    +
    +  before {
    +      warehousePath.delete()
    +      metastorePath.delete()
    +  }
    +
    +  after {
    +      warehousePath.delete()
    +      metastorePath.delete()
    +  }
    --- End diff --
    
    Why did this need to be moved out?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/5345#issuecomment-92402436
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/30167/
    Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by adachij2002 <gi...@git.apache.org>.
Github user adachij2002 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5345#discussion_r28481319
  
    --- Diff: sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/CliSuite.scala ---
    @@ -125,4 +133,23 @@ class CliSuite extends FunSuite with BeforeAndAfterAll with Logging {
       test("Single command with -e") {
         runCliWithin(1.minute, Seq("-e", "SHOW DATABASES;"))("" -> "OK")
       }
    +
    +  test("Single command with --database") {
    +    runCliWithin(1.minute)(
    +      "CREATE DATABASE hive_test_db;"
    +        -> "OK",
    +      "USE hive_test_db;"
    +        -> "OK",
    +      "CREATE TABLE hive_test(key INT, val STRING);"
    +        -> "OK",
    +      "SHOW TABLES;"
    +        -> "Time taken: "
    +    )
    +    runCliWithin(1.minute, Seq("--database", "hive_test_db", "-e", "SHOW TABLES;"))(
    --- End diff --
    
    @liancheng It is same with the queriesAndExpectedAnswers argument.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by liancheng <gi...@git.apache.org>.
Github user liancheng commented on the pull request:

    https://github.com/apache/spark/pull/5345#issuecomment-92366721
  
    retest this please.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by adachij2002 <gi...@git.apache.org>.
Github user adachij2002 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5345#discussion_r28480988
  
    --- Diff: sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/CliSuite.scala ---
    @@ -125,4 +133,23 @@ class CliSuite extends FunSuite with BeforeAndAfterAll with Logging {
       test("Single command with -e") {
         runCliWithin(1.minute, Seq("-e", "SHOW DATABASES;"))("" -> "OK")
       }
    +
    +  test("Single command with --database") {
    +    runCliWithin(1.minute)(
    --- End diff --
    
    @liancheng I have to pass multiple tuples like (a, b), (c, d),... for the queriesAndExpectedAnswers argument.
    Thus, it should be used ( ... ), not { ... }.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by marmbrus <gi...@git.apache.org>.
Github user marmbrus commented on the pull request:

    https://github.com/apache/spark/pull/5345#issuecomment-91967000
  
    ok to test


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/5345#issuecomment-91967983
  
      [Test build #30099 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/30099/consoleFull) for   PR 5345 at commit [`846f83e`](https://github.com/apache/spark/commit/846f83ea103d6d17a8aff3f22a77ed5a34810f1f).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by adachij2002 <gi...@git.apache.org>.
Github user adachij2002 commented on the pull request:

    https://github.com/apache/spark/pull/5345#issuecomment-90052855
  
    Thanks for your comment.
    I've added a testcase.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by adachij2002 <gi...@git.apache.org>.
Github user adachij2002 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5345#discussion_r28480993
  
    --- Diff: sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/CliSuite.scala ---
    @@ -125,4 +133,23 @@ class CliSuite extends FunSuite with BeforeAndAfterAll with Logging {
       test("Single command with -e") {
         runCliWithin(1.minute, Seq("-e", "SHOW DATABASES;"))("" -> "OK")
       }
    +
    +  test("Single command with --database") {
    +    runCliWithin(1.minute)(
    +      "CREATE DATABASE hive_test_db;"
    +        -> "OK",
    +      "USE hive_test_db;"
    +        -> "OK",
    +      "CREATE TABLE hive_test(key INT, val STRING);"
    +        -> "OK",
    +      "SHOW TABLES;"
    +        -> "Time taken: "
    +    )
    --- End diff --
    
    @liancheng I fixed it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by liancheng <gi...@git.apache.org>.
Github user liancheng commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5345#discussion_r28239350
  
    --- Diff: sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/CliSuite.scala ---
    @@ -26,22 +26,32 @@ import scala.concurrent.{Await, Promise}
     import scala.sys.process.{Process, ProcessLogger}
     
     import org.apache.hadoop.hive.conf.HiveConf.ConfVars
    -import org.scalatest.{BeforeAndAfterAll, FunSuite}
    +import org.scalatest.{BeforeAndAfter, BeforeAndAfterAll, FunSuite}
     
     import org.apache.spark.Logging
     import org.apache.spark.util.Utils
     
    -class CliSuite extends FunSuite with BeforeAndAfterAll with Logging {
    +class CliSuite extends FunSuite with BeforeAndAfter with BeforeAndAfterAll with Logging {
    +  val warehousePath = Utils.createTempDir()
    +  val metastorePath = Utils.createTempDir()
    +
    +  before {
    +      warehousePath.delete()
    +      metastorePath.delete()
    +  }
    +
    +  after {
    +      warehousePath.delete()
    +      metastorePath.delete()
    +  }
    +
       def runCliWithin(
           timeout: FiniteDuration,
    -      extraArgs: Seq[String] = Seq.empty)(
    +      extraArgs: Seq[String] = Seq.empty
    +      )(
    --- End diff --
    
    Please either use
    
    ```scala
    def runCliWithin(
        timeout: FiniteDuration,
        extraArgs: Seq[String] = Seq.empty)(
        queriesAndExpectedAnswers: (String, String)*): Unit = {
      ...
    }
    ```
    
    or
    
    ```scala
    def runCliWithin
        (timeout: FiniteDuration, extraArgs: Seq[String] = Seq.empty)
        (queriesAndExpectedAnswers: (String, String)*): Unit = {
      ...
    }
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/5345#issuecomment-93638827
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/30392/
    Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by liancheng <gi...@git.apache.org>.
Github user liancheng commented on the pull request:

    https://github.com/apache/spark/pull/5345#issuecomment-92367025
  
    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!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/5345#issuecomment-92367238
  
      [Test build #30167 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/30167/consoleFull) for   PR 5345 at commit [`846f83e`](https://github.com/apache/spark/commit/846f83ea103d6d17a8aff3f22a77ed5a34810f1f).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/5345#issuecomment-93638820
  
      [Test build #30392 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/30392/consoleFull) for   PR 5345 at commit [`df81086`](https://github.com/apache/spark/commit/df81086aa84b969e6e2c1cb6c9938aaeaf70dd30).
     * This patch **passes all tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.
     * This patch does not change any dependencies.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by adachij2002 <gi...@git.apache.org>.
Github user adachij2002 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5345#discussion_r28208276
  
    --- Diff: sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/CliSuite.scala ---
    @@ -26,22 +26,32 @@ import scala.concurrent.{Await, Promise}
     import scala.sys.process.{Process, ProcessLogger}
     
     import org.apache.hadoop.hive.conf.HiveConf.ConfVars
    -import org.scalatest.{BeforeAndAfterAll, FunSuite}
    +import org.scalatest.{BeforeAndAfter, BeforeAndAfterAll, FunSuite}
     
     import org.apache.spark.Logging
     import org.apache.spark.util.Utils
     
    -class CliSuite extends FunSuite with BeforeAndAfterAll with Logging {
    +class CliSuite extends FunSuite with BeforeAndAfter with BeforeAndAfterAll with Logging {
    +  val warehousePath = Utils.createTempDir()
    +  val metastorePath = Utils.createTempDir()
    +
    +  before {
    +      warehousePath.delete()
    +      metastorePath.delete()
    +  }
    +
    +  after {
    +      warehousePath.delete()
    +      metastorePath.delete()
    +  }
    --- End diff --
    
    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.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by adachij2002 <gi...@git.apache.org>.
Github user adachij2002 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5345#discussion_r28480973
  
    --- Diff: sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/CliSuite.scala ---
    @@ -26,22 +26,32 @@ import scala.concurrent.{Await, Promise}
     import scala.sys.process.{Process, ProcessLogger}
     
     import org.apache.hadoop.hive.conf.HiveConf.ConfVars
    -import org.scalatest.{BeforeAndAfterAll, FunSuite}
    +import org.scalatest.{BeforeAndAfter, BeforeAndAfterAll, FunSuite}
     
     import org.apache.spark.Logging
     import org.apache.spark.util.Utils
     
    -class CliSuite extends FunSuite with BeforeAndAfterAll with Logging {
    +class CliSuite extends FunSuite with BeforeAndAfter with BeforeAndAfterAll with Logging {
    +  val warehousePath = Utils.createTempDir()
    +  val metastorePath = Utils.createTempDir()
    +
    +  before {
    +      warehousePath.delete()
    +      metastorePath.delete()
    +  }
    +
    +  after {
    +      warehousePath.delete()
    +      metastorePath.delete()
    +  }
    +
       def runCliWithin(
           timeout: FiniteDuration,
    -      extraArgs: Seq[String] = Seq.empty)(
    +      extraArgs: Seq[String] = Seq.empty
    +      )(
    --- End diff --
    
    @liancheng I fixed it according to your suggestion.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/5345#issuecomment-92402424
  
      [Test build #30167 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/30167/consoleFull) for   PR 5345 at commit [`846f83e`](https://github.com/apache/spark/commit/846f83ea103d6d17a8aff3f22a77ed5a34810f1f).
     * This patch **passes all tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.
     * This patch does not change any dependencies.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/5345#issuecomment-91968056
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/30099/
    Test FAILed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by liancheng <gi...@git.apache.org>.
Github user liancheng commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5345#discussion_r28239541
  
    --- Diff: sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/CliSuite.scala ---
    @@ -26,22 +26,32 @@ import scala.concurrent.{Await, Promise}
     import scala.sys.process.{Process, ProcessLogger}
     
     import org.apache.hadoop.hive.conf.HiveConf.ConfVars
    -import org.scalatest.{BeforeAndAfterAll, FunSuite}
    +import org.scalatest.{BeforeAndAfter, BeforeAndAfterAll, FunSuite}
     
     import org.apache.spark.Logging
     import org.apache.spark.util.Utils
     
    -class CliSuite extends FunSuite with BeforeAndAfterAll with Logging {
    +class CliSuite extends FunSuite with BeforeAndAfter with BeforeAndAfterAll with Logging {
    --- End diff --
    
    Actually we can remove `BeforeAndAfterAll` from the original code since it's not used at all from the very beginning. (Please also remove the import altogether.)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/5345#issuecomment-89218520
  
    Can one of the admins verify this patch?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/5345#issuecomment-91968052
  
      [Test build #30099 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/30099/consoleFull) for   PR 5345 at commit [`846f83e`](https://github.com/apache/spark/commit/846f83ea103d6d17a8aff3f22a77ed5a34810f1f).
     * This patch **fails Scala style tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.
     * This patch does not change any dependencies.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/5345#issuecomment-93682827
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/30405/
    Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by liancheng <gi...@git.apache.org>.
Github user liancheng commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5345#discussion_r28521048
  
    --- Diff: sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/CliSuite.scala ---
    @@ -125,4 +133,23 @@ class CliSuite extends FunSuite with BeforeAndAfterAll with Logging {
       test("Single command with -e") {
         runCliWithin(1.minute, Seq("-e", "SHOW DATABASES;"))("" -> "OK")
       }
    +
    +  test("Single command with --database") {
    +    runCliWithin(1.minute)(
    --- End diff --
    
    Ah, sorry, you're right.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by liancheng <gi...@git.apache.org>.
Github user liancheng commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5345#discussion_r28239846
  
    --- Diff: sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/CliSuite.scala ---
    @@ -125,4 +133,23 @@ class CliSuite extends FunSuite with BeforeAndAfterAll with Logging {
       test("Single command with -e") {
         runCliWithin(1.minute, Seq("-e", "SHOW DATABASES;"))("" -> "OK")
       }
    +
    +  test("Single command with --database") {
    +    runCliWithin(1.minute)(
    +      "CREATE DATABASE hive_test_db;"
    +        -> "OK",
    +      "USE hive_test_db;"
    +        -> "OK",
    +      "CREATE TABLE hive_test(key INT, val STRING);"
    +        -> "OK",
    +      "SHOW TABLES;"
    +        -> "Time taken: "
    +    )
    +    runCliWithin(1.minute, Seq("--database", "hive_test_db", "-e", "SHOW TABLES;"))(
    --- End diff --
    
    The same, use braces rather than parenthesis for `queriesAndExpectedAnswers`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/5345#issuecomment-93682800
  
      [Test build #30405 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/30405/consoleFull) for   PR 5345 at commit [`8659084`](https://github.com/apache/spark/commit/8659084a9cfc4ec4b7cdc31dc330cd1834ea5492).
     * This patch **passes all tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.
     * This patch does not change any dependencies.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-6694][SQL]SparkSQL CLI must be able to ...

Posted by liancheng <gi...@git.apache.org>.
Github user liancheng commented on the pull request:

    https://github.com/apache/spark/pull/5345#issuecomment-89611702
  
    @adachij2002 Would you mind to add a test case for this in `CliSuite`? We can pass `--database <db>` via `extraArgs` in `runCliWithin` there.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org