Repository navigation
[SPARK-3988][SQL] add public API for date type - #2901
adrian-wang wants to merge 6 commits into
Conversation
|
QA tests have started for PR 2901 at commit
|
|
QA tests have finished for PR 2901 at commit
|
|
Test FAILed. |
|
QA tests have started for PR 2901 at commit
|
|
LGTM, thanks! |
|
QA tests have finished for PR 2901 at commit
|
|
Test FAILed. |
|
QA tests have started for PR 2901 at commit
|
|
QA tests have started for PR 2901 at commit
|
|
QA tests have finished for PR 2901 at commit
|
|
Test PASSed. |
|
QA tests have finished for PR 2901 at commit
|
|
Test PASSed. |
There was a problem hiding this comment.
minor: these two lines can be combined.
|
Thanks for fix so many typos! It will be awesome to recognize all Date/Timestamps values in JsonRDD. If it's not easy to do it in this PR, we could do it in another one. |
There was a problem hiding this comment.
@davies because of using pyrolite, java.sql.Date is serialized in the same way as java.sql.Timestamp, since they are all subtype of java.util.Date. And this make the dumps() function to generate datetime instead of date for java.util.Date. I think this is related to your comments in JIRA SPARK-2674
There was a problem hiding this comment.
Oh, I see. After the data was deserialized in Python, we need to some data coversions, so we can convert datetime to date if DataType is DateType.
There was a problem hiding this comment.
so should the convert in python side or scala side, which one would you prefer?
There was a problem hiding this comment.
I think we can only do it in Python side.
|
Test build #22133 has started for PR 2901 at commit
|
|
Test build #22133 has finished for PR 2901 at commit
|
|
Test PASSed. |
|
Test build #440 has started for PR 2901 at commit
|
|
Test build #440 has finished for PR 2901 at commit
|
|
retest this please. |
|
Test build #22215 has started for PR 2901 at commit
|
|
Test build #22215 has finished for PR 2901 at commit
|
|
Test PASSed. |
|
@davies does anything else remain to be done here? |
|
@marmbrus There is a bug: DateType object will be datetime in Python. Also we could improve DataType/TimestampType support in jsonRDD, it could be done separately. @adrian-wang You could convert |
|
@adrian-wang You can do it like this: |
|
@davies |
|
Test build #22274 has started for PR 2901 at commit
|
|
LGTM, waiting for the tests. |
|
Test build #22274 has finished for PR 2901 at commit
|
|
Test PASSed. |
|
Thanks! Merged to master. |
This implement the feature davies mentioned in #2901 (diff) Author: Daoyuan Wang <daoyuan.wang@intel.com> Closes #3012 from adrian-wang/iso8601 and squashes the following commits: 50df6e7 [Daoyuan Wang] json data timestamp ISO8601 support
This implement the feature davies mentioned in #2901 (diff) Author: Daoyuan Wang <daoyuan.wang@intel.com> Closes #3012 from adrian-wang/iso8601 and squashes the following commits: 50df6e7 [Daoyuan Wang] json data timestamp ISO8601 support (cherry picked from commit a1fc059) Signed-off-by: Michael Armbrust <michael@databricks.com>
Add json and python api for date type.
By using Pickle,
java.sql.Datewas serialized as calendar, and recognized in python asdatetime.datetime.