[SPARK-11788][SQL] surround timestamp/date value with quotes in JDBC data source#9872
Closed
huaxingao wants to merge 4 commits into
Closed
[SPARK-11788][SQL] surround timestamp/date value with quotes in JDBC data source#9872huaxingao wants to merge 4 commits into
huaxingao wants to merge 4 commits into
Conversation
Contributor
|
Can you add a regression test for this? |
Contributor
Author
|
Sure. Will add a test. |
Contributor
Author
|
@JoshRosen |
Contributor
|
LGTM - Jenkins, test this please. |
Contributor
|
Can you update the title to "[SPARK-11788][SQL] surround timestamp/date value with quotes in JDBC data source" |
|
Test build #2122 has finished for PR 9872 at commit
|
Contributor
Author
|
Fixed title and scala style problem. Thanks! |
|
Test build #2135 has finished for PR 9872 at commit
|
Contributor
|
Merging to master and branch 1.6. |
asfgit
pushed a commit
that referenced
this pull request
Dec 1, 2015
…data source When query the Timestamp or Date column like the following val filtered = jdbcdf.where($"TIMESTAMP_COLUMN" >= beg && $"TIMESTAMP_COLUMN" < end) The generated SQL query is "TIMESTAMP_COLUMN >= 2015-01-01 00:00:00.0" It should have quote around the Timestamp/Date value such as "TIMESTAMP_COLUMN >= '2015-01-01 00:00:00.0'" Author: Huaxin Gao <huaxing@oc0558782468.ibm.com> Closes #9872 from huaxingao/spark-11788. (cherry picked from commit 5a8b5fd) Signed-off-by: Yin Huai <yhuai@databricks.com>
asfgit
pushed a commit
that referenced
this pull request
Dec 2, 2015
…data source When query the Timestamp or Date column like the following val filtered = jdbcdf.where($"TIMESTAMP_COLUMN" >= beg && $"TIMESTAMP_COLUMN" < end) The generated SQL query is "TIMESTAMP_COLUMN >= 2015-01-01 00:00:00.0" It should have quote around the Timestamp/Date value such as "TIMESTAMP_COLUMN >= '2015-01-01 00:00:00.0'" Author: Huaxin Gao <huaxing@oc0558782468.ibm.com> Closes #9872 from huaxingao/spark-11788. (cherry picked from commit 5a8b5fd) Signed-off-by: Yin Huai <yhuai@databricks.com> Conflicts: sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCSuite.scala
Contributor
|
I also merged it in branch 1.5. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When query the Timestamp or Date column like the following$"TIMESTAMP_COLUMN" >= beg && $ "TIMESTAMP_COLUMN" < end)
val filtered = jdbcdf.where(
The generated SQL query is "TIMESTAMP_COLUMN >= 2015-01-01 00:00:00.0"
It should have quote around the Timestamp/Date value such as "TIMESTAMP_COLUMN >= '2015-01-01 00:00:00.0'"