You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by viirya <gi...@git.apache.org> on 2015/06/02 08:54:29 UTC

[GitHub] spark pull request: [SPARK-8004][SQL] Enclose column names by JDBC...

GitHub user viirya opened a pull request:

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

    [SPARK-8004][SQL] Enclose column names by JDBC Dialect

    JIRA: https://issues.apache.org/jira/browse/SPARK-8004


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

    $ git pull https://github.com/viirya/spark-1 enclose_jdbc_columns

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

    https://github.com/apache/spark/pull/6577.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 #6577
    
----
commit bc5018269e6490ee3837ac7ccfd54a82e84d391f
Author: Liang-Chi Hsieh <vi...@gmail.com>
Date:   2015-06-02T06:53:03Z

    Enclose column names by JDBC Dialect.

----


---
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-8004][SQL] Enclose column names by JDBC...

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

    https://github.com/apache/spark/pull/6577#discussion_r31497372
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala ---
    @@ -80,6 +80,15 @@ abstract class JdbcDialect {
        * @return The new JdbcType if there is an override for this DataType
        */
       def getJDBCType(dt: DataType): Option[JdbcType] = None
    +
    +  /**
    +   * Enclose column name
    +   * @param colName The coulmn name
    +   * @return Enclosed column name
    +   */
    +  def columnEnclosing(colName: String): String = {
    +    colName.split('.').map(c => s""""$c"""").mkString(".")
    --- End diff --
    
    In what case can we have key.value? I thought it's a column pushed down by spark sql 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-8004][SQL] Enclose column names by JDBC...

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

    https://github.com/apache/spark/pull/6577#issuecomment-107938951
  
    Merged build finished. 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-8004][SQL] Enclose column names by JDBC...

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

    https://github.com/apache/spark/pull/6577#issuecomment-107831918
  
      [Test build #33964 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/33964/consoleFull) for   PR 6577 at commit [`bc50182`](https://github.com/apache/spark/commit/bc5018269e6490ee3837ac7ccfd54a82e84d391f).


---
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-8004][SQL] Enclose column names by JDBC...

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

    https://github.com/apache/spark/pull/6577#discussion_r31497178
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala ---
    @@ -80,6 +80,15 @@ abstract class JdbcDialect {
        * @return The new JdbcType if there is an override for this DataType
        */
       def getJDBCType(dt: DataType): Option[JdbcType] = None
    +
    +  /**
    +   * Enclose column name
    +   * @param colName The coulmn name
    +   * @return Enclosed column name
    +   */
    +  def columnEnclosing(colName: String): String = {
    +    colName.split('.').map(c => s""""$c"""").mkString(".")
    --- End diff --
    
    You mean "abc."? Is it legal column name?


---
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-8004][SQL] Enclose column names by JDBC...

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

    https://github.com/apache/spark/pull/6577#discussion_r31497802
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala ---
    @@ -80,6 +80,15 @@ abstract class JdbcDialect {
        * @return The new JdbcType if there is an override for this DataType
        */
       def getJDBCType(dt: DataType): Option[JdbcType] = None
    +
    +  /**
    +   * Enclose column name
    +   * @param colName The coulmn name
    +   * @return Enclosed column name
    +   */
    +  def columnEnclosing(colName: String): String = {
    +    colName.split('.').map(c => s""""$c"""").mkString(".")
    --- End diff --
    
    hmm, can't we have sql like "SELECT column.table FROM table"? I think it is correct sql query?


---
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-8004][SQL] Enclose column names by JDBC...

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

    https://github.com/apache/spark/pull/6577#issuecomment-107831649
  
    Merged build started.


---
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-8004][SQL] Enclose column names by JDBC...

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

    https://github.com/apache/spark/pull/6577#issuecomment-107831639
  
     Merged build triggered.


---
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-8004][SQL] Enclose column names by JDBC...

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

    https://github.com/apache/spark/pull/6577#issuecomment-107873836
  
    Merged build finished. 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-8004][SQL] Enclose column names by JDBC...

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

    https://github.com/apache/spark/pull/6577#issuecomment-107873816
  
      [Test build #33964 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/33964/consoleFull) for   PR 6577 at commit [`bc50182`](https://github.com/apache/spark/commit/bc5018269e6490ee3837ac7ccfd54a82e84d391f).
     * This patch **passes all tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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-8004][SQL] Enclose column names by JDBC...

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

    https://github.com/apache/spark/pull/6577#issuecomment-107912862
  
     Merged build triggered.


---
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-8004][SQL] Enclose column names by JDBC...

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

    https://github.com/apache/spark/pull/6577#issuecomment-107938938
  
      [Test build #33980 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/33980/consoleFull) for   PR 6577 at commit [`614606a`](https://github.com/apache/spark/commit/614606ab85818f6886d83ecfabedd8ad90177799).
     * This patch **passes all tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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-8004][SQL] Enclose column names by JDBC...

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

    https://github.com/apache/spark/pull/6577#issuecomment-107913200
  
      [Test build #33980 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/33980/consoleFull) for   PR 6577 at commit [`614606a`](https://github.com/apache/spark/commit/614606ab85818f6886d83ecfabedd8ad90177799).


---
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-8004][SQL] Enclose column names by JDBC...

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

    https://github.com/apache/spark/pull/6577#issuecomment-107912886
  
    Merged build started.


---
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-8004][SQL] Enclose column names by JDBC...

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

    https://github.com/apache/spark/pull/6577#discussion_r31496680
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/jdbc/JdbcDialects.scala ---
    @@ -80,6 +80,15 @@ abstract class JdbcDialect {
        * @return The new JdbcType if there is an override for this DataType
        */
       def getJDBCType(dt: DataType): Option[JdbcType] = None
    +
    +  /**
    +   * Enclose column name
    +   * @param colName The coulmn name
    +   * @return Enclosed column name
    +   */
    +  def columnEnclosing(colName: String): String = {
    +    colName.split('.').map(c => s""""$c"""").mkString(".")
    --- End diff --
    
    can colName have . ? 


---
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