Skip to content

Conversation

@viirya
Copy link
Member

@viirya viirya commented Jun 2, 2015

Copy link
Contributor

Choose a reason for hiding this comment

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

can colName have . ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Currently you can have key.value. And it is enclosed as key.value.

Copy link
Contributor

Choose a reason for hiding this comment

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

In what case can we have key.value? I thought it's a column pushed down by spark sql here?

Basically if it's a column name that has a dot in it, this blindly splits it and adds quote. I don't think that's correct?

Copy link
Member Author

Choose a reason for hiding this comment

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

hmm, can't we have sql like "SELECT column.table FROM table"? I think it is correct sql query? If not, I think we can just enclose the column to make thing simple.

@SparkQA
Copy link

SparkQA commented Jun 2, 2015

Test build #33964 has finished for PR 6577 at commit bc50182.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jun 2, 2015

Test build #33980 has finished for PR 6577 at commit 614606a.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@viirya
Copy link
Member Author

viirya commented Jun 6, 2015

ping @rxin

Copy link
Contributor

Choose a reason for hiding this comment

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

rename this "quoteIdentifier", and change the documentation to

Quotes the identifier. This is used to put quotes around the identifier in case the column name is a reserved keyword, or in case it contains characters that require quotes (e.g. space).

Remove the @param and @return.

@rxin
Copy link
Contributor

rxin commented Jun 7, 2015

Actually I will fix that myself. Thanks for doing it. Merging in master & branch-1.4.

@viirya
Copy link
Member Author

viirya commented Jun 7, 2015

ok. Thanks.

rxin pushed a commit to rxin/spark that referenced this pull request Jun 7, 2015
JIRA: https://issues.apache.org/jira/browse/SPARK-8004

Author: Liang-Chi Hsieh <viirya@gmail.com>

Closes apache#6577 from viirya/enclose_jdbc_columns and squashes the following commits:

614606a [Liang-Chi Hsieh] For comment.
bc50182 [Liang-Chi Hsieh] Enclose column names by JDBC Dialect.
rxin added a commit to rxin/spark that referenced this pull request Jun 7, 2015
This is a follow-up patch to apache#6577 to replace columnEnclosing to quoteIdentifier.
viirya added a commit that referenced this pull request Jun 7, 2015
JIRA: https://issues.apache.org/jira/browse/SPARK-8004

Author: Liang-Chi Hsieh <viirya@gmail.com>

Closes #6577 from viirya/enclose_jdbc_columns and squashes the following commits:

614606a [Liang-Chi Hsieh] For comment.
bc50182 [Liang-Chi Hsieh] Enclose column names by JDBC Dialect.

(cherry picked from commit 901a552)
Signed-off-by: Reynold Xin <rxin@databricks.com>
@viirya viirya closed this Jun 7, 2015
rxin added a commit that referenced this pull request Jun 7, 2015
This is a follow-up patch to #6577 to replace columnEnclosing to quoteIdentifier.

I also did some minor cleanup to the JdbcDialect file.

Author: Reynold Xin <rxin@databricks.com>

Closes #6689 from rxin/jdbc-quote and squashes the following commits:

bad365f [Reynold Xin] Fixed test compilation...
e39e14e [Reynold Xin] Fixed compilation.
db9a8e0 [Reynold Xin] [SPARK-8004][SQL] Quote identifier in JDBC data source.
rxin added a commit that referenced this pull request Jun 7, 2015
This is a follow-up patch to #6577 to replace columnEnclosing to quoteIdentifier.

I also did some minor cleanup to the JdbcDialect file.

Author: Reynold Xin <rxin@databricks.com>

Closes #6689 from rxin/jdbc-quote and squashes the following commits:

bad365f [Reynold Xin] Fixed test compilation...
e39e14e [Reynold Xin] Fixed compilation.
db9a8e0 [Reynold Xin] [SPARK-8004][SQL] Quote identifier in JDBC data source.

(cherry picked from commit d6d601a)
Signed-off-by: Reynold Xin <rxin@databricks.com>
nemccarthy pushed a commit to nemccarthy/spark that referenced this pull request Jun 19, 2015
JIRA: https://issues.apache.org/jira/browse/SPARK-8004

Author: Liang-Chi Hsieh <viirya@gmail.com>

Closes apache#6577 from viirya/enclose_jdbc_columns and squashes the following commits:

614606a [Liang-Chi Hsieh] For comment.
bc50182 [Liang-Chi Hsieh] Enclose column names by JDBC Dialect.
nemccarthy pushed a commit to nemccarthy/spark that referenced this pull request Jun 19, 2015
This is a follow-up patch to apache#6577 to replace columnEnclosing to quoteIdentifier.

I also did some minor cleanup to the JdbcDialect file.

Author: Reynold Xin <rxin@databricks.com>

Closes apache#6689 from rxin/jdbc-quote and squashes the following commits:

bad365f [Reynold Xin] Fixed test compilation...
e39e14e [Reynold Xin] Fixed compilation.
db9a8e0 [Reynold Xin] [SPARK-8004][SQL] Quote identifier in JDBC data source.
@viirya viirya deleted the enclose_jdbc_columns branch December 27, 2023 18:31
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.

3 participants