Uh oh!
There was an error while loading. Please reload this page.
[SPARK-14460] [SQL] properly handling of column name contains space - #12252
[SPARK-14460] [SQL] properly handling of column name contains space#12252bomeng wants to merge 11 commits into
Conversation
SparkQA
commented
Apr 8, 2016
Test build #55312 has finished for PR 12252 at commit
|
SparkQA
commented
Apr 8, 2016
Test build #55309 has finished for PR 12252 at commit
|
SparkQA
commented
Apr 8, 2016
Test build #55330 has finished for PR 12252 at commit
|
SparkQA
commented
Apr 8, 2016
Test build #55328 has finished for PR 12252 at commit
|
bomeng
commented
Apr 11, 2016
@andrewor14 Could you please review my codes? |
SparkQA
commented
Apr 14, 2016
Test build #55851 has finished for PR 12252 at commit
|
SparkQA
commented
Apr 14, 2016
Test build #55854 has finished for PR 12252 at commit
|
| */ | ||
| def schemaString(df: DataFrame, url: String): String = { | ||
| def schemaString(dialect: JdbcDialect, df: DataFrame, url: String): String = { | ||
| val sb = new StringBuilder() |
There was a problem hiding this comment.
Is the new dialect you're passing in different from this one in some way?
There was a problem hiding this comment.
The purpose to pass in dialect is to get proper quote for columns based on its data source. Any suggestion?
There was a problem hiding this comment.
You pass in a parameter named dialect to the schemaString method, but there's also the dialect that comes from JdbcDialects.get(url) --- that's the duplicate I was trying to point out
There was a problem hiding this comment.
Thanks for pointing out. I've modified the codes. Please check it out.
SparkQA
commented
Apr 15, 2016
Test build #55889 has finished for PR 12252 at commit
|
SparkQA
commented
Apr 15, 2016
Test build #55891 has finished for PR 12252 at commit
|
SparkQA
commented
Apr 20, 2016
Test build #56384 has finished for PR 12252 at commit
|
cloud-fan
commented
May 25, 2017
seems it's fixed in #15662 ? |
HyukjinKwon
commented
Jun 2, 2017
ping @bomeng for ^. |
# What changes were proposed in this pull request? This PR proposes to close stale PRs, mostly the same instances with apache#18017Closesapache#11459Closesapache#13833Closesapache#13720Closesapache#12506Closesapache#12456Closesapache#12252Closesapache#17689Closesapache#17791Closesapache#18163Closesapache#17640Closesapache#17926Closesapache#18163Closesapache#12506Closesapache#18044Closesapache#14036Closesapache#15831Closesapache#14461Closesapache#17638Closesapache#18222 Added: Closesapache#18045Closesapache#18061Closesapache#18010Closesapache#18041Closesapache#18124Closesapache#18130Closesapache#12217 Added: Closesapache#16291Closesapache#17480Closesapache#14995 Added: Closesapache#12835Closesapache#17141 ## How was this patch tested? N/A Author: hyukjinkwon <gurwls223@gmail.com> Closesapache#18223 from HyukjinKwon/close-stale-prs.
What changes were proposed in this pull request?
Although it is not recommended, table can be created with column name containing space. For example,
When we query the table via JDBC, we also need to quote the column name in the same way if the column name contains space.
I am leveraging the quote method in the dialect, it will add the proper quote to the column name based on its data source.
How was this patch tested?
I've updated the test case to test this scenario.