[SPARK-28587][SQL] Explicitly cast JDBC partition string literals to timestamp/date#25707
[SPARK-28587][SQL] Explicitly cast JDBC partition string literals to timestamp/date#25707maropu wants to merge 1 commit intoapache:masterfrom
Conversation
|
Yea, it looks making sense to me. |
|
Test build #110211 has finished for PR 25707 at commit
|
|
In general it looks reasonable but I have these concerns:
|
|
@HyukjinKwon @MaxGekk Thanks for the check, guys!
Ur, it looks a nice suggestion... I saw this comment then I re-checked the type name for timestamps in the other databases; https://www.w3resource.com/sql/data-type.php#DATETIME
I see. But, does the behaviour difference between |
|
We're closing this PR because it hasn't been updated in a while. If you'd like to revive this PR, please reopen it! |
What changes were proposed in this pull request?
This pr proposes to add explicit casts for generated JDBC partition string literals. In the current master, that logic depends on implicit casts of datasource DBMSs. For example;
The query above generates
"t" < '1972-07-15 20:50:32.5' or "t" is null"and"t" >= '1972-07-15 20:50:32.5'internally for where clauses. Sincetis timestamp, the clauses depend on implicit casts of PostgreSQL. The current one looks ok in most databases, but I believe explicit casts are more reasonable.Why are the changes needed?
To support JDBC partitioning broadly.
Does this PR introduce any user-facing change?
No
How was this patch tested?
Existing tests.