[GitHub] spark pull request #18769: [SPARK-21574][SQL] Point out user to set hive con...

2017-08-06 Thread asfgit
Github user asfgit closed the pull request at:

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


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #18769: [SPARK-21574][SQL] Point out user to set hive con...

2017-08-05 Thread gatorsmile
Github user gatorsmile commented on a diff in the pull request:

https://github.com/apache/spark/pull/18769#discussion_r131535411
  
--- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/SetCommand.scala 
---
@@ -88,12 +88,13 @@ case class SetCommand(kv: Option[(String, 
Option[String])]) extends RunnableComm
 // Configures a single property.
 case Some((key, Some(value))) =>
   val runFunc = (sparkSession: SparkSession) => {
-if 
(sparkSession.conf.get(CATALOG_IMPLEMENTATION.key).equals("hive")
-  && key.startsWith("hive.")) {
-  logWarning(s"SET $key=$value doesn't work, " +
-s"because Spark doesn't support set hive config dynamically. " 
+
-s"Please set hive config through " +
-s"--conf spark.hadoop.$key=$value before SparkSession is 
initialized.")
+if 
(sparkSession.conf.get(CATALOG_IMPLEMENTATION.key).equals("hive") &&
+  key.startsWith("hive.")) {
+  logWarning(s"'SET $key=$value' might not work, since Spark 
doesn't support changing " +
+s"the Hive config dynamically. Please passing the 
Hive-specific config by adding the " +
+s"prefix spark.hadoop (e.g.,spark.hadoop.$key) when starting a 
Spark application. " +
--- End diff --

Please add a space after `e.g.,`


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #18769: [SPARK-21574][SQL] Point out user to set hive con...

2017-08-05 Thread gatorsmile
Github user gatorsmile commented on a diff in the pull request:

https://github.com/apache/spark/pull/18769#discussion_r131535400
  
--- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/SetCommand.scala 
---
@@ -88,12 +88,13 @@ case class SetCommand(kv: Option[(String, 
Option[String])]) extends RunnableComm
 // Configures a single property.
 case Some((key, Some(value))) =>
   val runFunc = (sparkSession: SparkSession) => {
-if 
(sparkSession.conf.get(CATALOG_IMPLEMENTATION.key).equals("hive")
-  && key.startsWith("hive.")) {
-  logWarning(s"SET $key=$value doesn't work, " +
-s"because Spark doesn't support set hive config dynamically. " 
+
-s"Please set hive config through " +
-s"--conf spark.hadoop.$key=$value before SparkSession is 
initialized.")
+if 
(sparkSession.conf.get(CATALOG_IMPLEMENTATION.key).equals("hive") &&
+  key.startsWith("hive.")) {
+  logWarning(s"'SET $key=$value' might not work, since Spark 
doesn't support changing " +
+s"the Hive config dynamically. Please passing the 
Hive-specific config by adding the " +
+s"prefix spark.hadoop (e.g.,spark.hadoop.$key) when starting a 
Spark application. " +
+s"For details, see the link: 
https://spark.apache.org/docs/latest/configuration.html#"; +
+s"dynamically-loading-spark-properties.")
--- End diff --

Except the line 93, the other lines do not need `s`


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #18769: [SPARK-21574][SQL] Point out user to set hive con...

2017-08-05 Thread gatorsmile
Github user gatorsmile commented on a diff in the pull request:

https://github.com/apache/spark/pull/18769#discussion_r131535384
  
--- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/SetCommand.scala 
---
@@ -88,12 +88,13 @@ case class SetCommand(kv: Option[(String, 
Option[String])]) extends RunnableComm
 // Configures a single property.
 case Some((key, Some(value))) =>
   val runFunc = (sparkSession: SparkSession) => {
-if 
(sparkSession.conf.get(CATALOG_IMPLEMENTATION.key).equals("hive")
-  && key.startsWith("hive.")) {
-  logWarning(s"SET $key=$value doesn't work, " +
-s"because Spark doesn't support set hive config dynamically. " 
+
-s"Please set hive config through " +
-s"--conf spark.hadoop.$key=$value before SparkSession is 
initialized.")
+if 
(sparkSession.conf.get(CATALOG_IMPLEMENTATION.key).equals("hive") &&
+  key.startsWith("hive.")) {
--- End diff --

Nit: could you add two more spaces before `key`?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #18769: [SPARK-21574][SQL] Point out user to set hive con...

2017-08-05 Thread gatorsmile
Github user gatorsmile commented on a diff in the pull request:

https://github.com/apache/spark/pull/18769#discussion_r131535017
  
--- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/SetCommand.scala 
---
@@ -87,6 +88,13 @@ case class SetCommand(kv: Option[(String, 
Option[String])]) extends RunnableComm
 // Configures a single property.
 case Some((key, Some(value))) =>
   val runFunc = (sparkSession: SparkSession) => {
+if 
(sparkSession.conf.get(CATALOG_IMPLEMENTATION.key).equals("hive")
+  && key.startsWith("hive.")) {
--- End diff --

```
if (sparkSession.conf.get(CATALOG_IMPLEMENTATION.key).equals("hive") &&
key.startsWith("hive.")) {
```


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #18769: [SPARK-21574][SQL] Point out user to set hive con...

2017-08-05 Thread gatorsmile
Github user gatorsmile commented on a diff in the pull request:

https://github.com/apache/spark/pull/18769#discussion_r131535007
  
--- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/SetCommand.scala 
---
@@ -87,6 +88,13 @@ case class SetCommand(kv: Option[(String, 
Option[String])]) extends RunnableComm
 // Configures a single property.
 case Some((key, Some(value))) =>
   val runFunc = (sparkSession: SparkSession) => {
+if 
(sparkSession.conf.get(CATALOG_IMPLEMENTATION.key).equals("hive")
+  && key.startsWith("hive.")) {
+  logWarning(s"SET $key=$value doesn't work, " +
+s"because Spark doesn't support set hive config dynamically. " 
+
+s"Please set hive config through " +
+s"--conf spark.hadoop.$key=$value before SparkSession is 
initialized.")
--- End diff --

How about?

> 'SET $key=$value' might not work, since Spark doesn't support changing 
the Hive config dynamically. Please passing the Hive-specific config by adding 
the prefix `spark.hadoop` (e.g.,`spark.hadoop.$key`) when starting a Spark 
application. For details, see the link: 
https://spark.apache.org/docs/latest/configuration.html#dynamically-loading-spark-properties.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #18769: [SPARK-21574][SQL] Point out user to set hive con...

2017-08-05 Thread wangyum
Github user wangyum commented on a diff in the pull request:

https://github.com/apache/spark/pull/18769#discussion_r131534966
  
--- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/SetCommand.scala 
---
@@ -87,6 +88,13 @@ case class SetCommand(kv: Option[(String, 
Option[String])]) extends RunnableComm
 // Configures a single property.
 case Some((key, Some(value))) =>
   val runFunc = (sparkSession: SparkSession) => {
+if 
(sparkSession.conf.get(CATALOG_IMPLEMENTATION.key).equals("hive")
+  && key.startsWith("hive.")) {
--- End diff --

Line length exceed 100:
https://user-images.githubusercontent.com/5399861/29000987-f7ee1d1c-7aae-11e7-9185-e59b4fd5ea4e.png";>


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] spark pull request #18769: [SPARK-21574][SQL] Point out user to set hive con...

2017-08-05 Thread gatorsmile
Github user gatorsmile commented on a diff in the pull request:

https://github.com/apache/spark/pull/18769#discussion_r131534846
  
--- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/SetCommand.scala 
---
@@ -87,6 +88,13 @@ case class SetCommand(kv: Option[(String, 
Option[String])]) extends RunnableComm
 // Configures a single property.
 case Some((key, Some(value))) =>
   val runFunc = (sparkSession: SparkSession) => {
+if 
(sparkSession.conf.get(CATALOG_IMPLEMENTATION.key).equals("hive")
+  && key.startsWith("hive.")) {
--- End diff --

Nit: Could you move this `&&` to the line 91?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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