{"action":"closed","number":23358,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/23358","id":240319096,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQwMzE5MDk2","html_url":"https://github.com/apache/spark/pull/23358","diff_url":"https://github.com/apache/spark/pull/23358.diff","patch_url":"https://github.com/apache/spark/pull/23358.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/23358","number":23358,"state":"closed","locked":false,"title":"[SPARK-26424][SQL] Use java.time API in date/timestamp expressions","user":{"login":"MaxGekk","id":1580697,"node_id":"MDQ6VXNlcjE1ODA2OTc=","avatar_url":"https://avatars1.githubusercontent.com/u/1580697?v=4","gravatar_id":"","url":"https://api.github.com/users/MaxGekk","html_url":"https://github.com/MaxGekk","followers_url":"https://api.github.com/users/MaxGekk/followers","following_url":"https://api.github.com/users/MaxGekk/following{/other_user}","gists_url":"https://api.github.com/users/MaxGekk/gists{/gist_id}","starred_url":"https://api.github.com/users/MaxGekk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaxGekk/subscriptions","organizations_url":"https://api.github.com/users/MaxGekk/orgs","repos_url":"https://api.github.com/users/MaxGekk/repos","events_url":"https://api.github.com/users/MaxGekk/events{/privacy}","received_events_url":"https://api.github.com/users/MaxGekk/received_events","type":"User","site_admin":false},"body":"## What changes were proposed in this pull request?\r\n\r\nIn the PR, I propose to switch the `DateFormatClass`, `ToUnixTimestamp`, `FromUnixTime`, `UnixTime` on java.time API for parsing/formatting dates and timestamps. The API has been already implemented by the `Timestamp`/`DateFormatter` classes. One of benefit is those classes support parsing timestamps with microsecond precision. Old behaviour can be switched on via SQL config: `spark.sql.legacy.timeParser.enabled` (`false` by default).\r\n\r\n## How was this patch tested?\r\n\r\nIt was tested by existing test suites - `DateFunctionsSuite`, `DateExpressionsSuite`, `JsonSuite`, `CsvSuite`, `SQLQueryTestSuite` as well as PySpark tests.\r\n","created_at":"2018-12-20T22:22:55Z","updated_at":"2018-12-27T03:13:47Z","closed_at":"2018-12-27T03:13:47Z","merged_at":null,"merge_commit_sha":"b0c7f567ff252d0a13fa6d5542acb524aeea8565","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/23358/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/23358/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/23358/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/0e1afc3f893529c579c737702b42af1d31f5bd63","head":{"label":"MaxGekk:new-time-cast","ref":"new-time-cast","sha":"0e1afc3f893529c579c737702b42af1d31f5bd63","user":{"login":"MaxGekk","id":1580697,"node_id":"MDQ6VXNlcjE1ODA2OTc=","avatar_url":"https://avatars1.githubusercontent.com/u/1580697?v=4","gravatar_id":"","url":"https://api.github.com/users/MaxGekk","html_url":"https://github.com/MaxGekk","followers_url":"https://api.github.com/users/MaxGekk/followers","following_url":"https://api.github.com/users/MaxGekk/following{/other_user}","gists_url":"https://api.github.com/users/MaxGekk/gists{/gist_id}","starred_url":"https://api.github.com/users/MaxGekk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaxGekk/subscriptions","organizations_url":"https://api.github.com/users/MaxGekk/orgs","repos_url":"https://api.github.com/users/MaxGekk/repos","events_url":"https://api.github.com/users/MaxGekk/events{/privacy}","received_events_url":"https://api.github.com/users/MaxGekk/received_events","type":"User","site_admin":false},"repo":{"id":123690489,"node_id":"MDEwOlJlcG9zaXRvcnkxMjM2OTA0ODk=","name":"spark-1","full_name":"MaxGekk/spark-1","private":false,"owner":{"login":"MaxGekk","id":1580697,"node_id":"MDQ6VXNlcjE1ODA2OTc=","avatar_url":"https://avatars1.githubusercontent.com/u/1580697?v=4","gravatar_id":"","url":"https://api.github.com/users/MaxGekk","html_url":"https://github.com/MaxGekk","followers_url":"https://api.github.com/users/MaxGekk/followers","following_url":"https://api.github.com/users/MaxGekk/following{/other_user}","gists_url":"https://api.github.com/users/MaxGekk/gists{/gist_id}","starred_url":"https://api.github.com/users/MaxGekk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaxGekk/subscriptions","organizations_url":"https://api.github.com/users/MaxGekk/orgs","repos_url":"https://api.github.com/users/MaxGekk/repos","events_url":"https://api.github.com/users/MaxGekk/events{/privacy}","received_events_url":"https://api.github.com/users/MaxGekk/received_events","type":"User","site_admin":false},"html_url":"https://github.com/MaxGekk/spark-1","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/MaxGekk/spark-1","forks_url":"https://api.github.com/repos/MaxGekk/spark-1/forks","keys_url":"https://api.github.com/repos/MaxGekk/spark-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MaxGekk/spark-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MaxGekk/spark-1/teams","hooks_url":"https://api.github.com/repos/MaxGekk/spark-1/hooks","issue_events_url":"https://api.github.com/repos/MaxGekk/spark-1/issues/events{/number}","events_url":"https://api.github.com/repos/MaxGekk/spark-1/events","assignees_url":"https://api.github.com/repos/MaxGekk/spark-1/assignees{/user}","branches_url":"https://api.github.com/repos/MaxGekk/spark-1/branches{/branch}","tags_url":"https://api.github.com/repos/MaxGekk/spark-1/tags","blobs_url":"https://api.github.com/repos/MaxGekk/spark-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MaxGekk/spark-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MaxGekk/spark-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/MaxGekk/spark-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MaxGekk/spark-1/statuses/{sha}","languages_url":"https://api.github.com/repos/MaxGekk/spark-1/languages","stargazers_url":"https://api.github.com/repos/MaxGekk/spark-1/stargazers","contributors_url":"https://api.github.com/repos/MaxGekk/spark-1/contributors","subscribers_url":"https://api.github.com/repos/MaxGekk/spark-1/subscribers","subscription_url":"https://api.github.com/repos/MaxGekk/spark-1/subscription","commits_url":"https://api.github.com/repos/MaxGekk/spark-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/MaxGekk/spark-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/MaxGekk/spark-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/MaxGekk/spark-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/MaxGekk/spark-1/contents/{+path}","compare_url":"https://api.github.com/repos/MaxGekk/spark-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MaxGekk/spark-1/merges","archive_url":"https://api.github.com/repos/MaxGekk/spark-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MaxGekk/spark-1/downloads","issues_url":"https://api.github.com/repos/MaxGekk/spark-1/issues{/number}","pulls_url":"https://api.github.com/repos/MaxGekk/spark-1/pulls{/number}","milestones_url":"https://api.github.com/repos/MaxGekk/spark-1/milestones{/number}","notifications_url":"https://api.github.com/repos/MaxGekk/spark-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MaxGekk/spark-1/labels{/name}","releases_url":"https://api.github.com/repos/MaxGekk/spark-1/releases{/id}","deployments_url":"https://api.github.com/repos/MaxGekk/spark-1/deployments","created_at":"2018-03-03T12:37:00Z","updated_at":"2018-12-22T20:27:36Z","pushed_at":"2018-12-24T15:30:51Z","git_url":"git://github.com/MaxGekk/spark-1.git","ssh_url":"git@github.com:MaxGekk/spark-1.git","clone_url":"https://github.com/MaxGekk/spark-1.git","svn_url":"https://github.com/MaxGekk/spark-1","homepage":null,"size":291160,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"0523f5e378e69f406104fabaf3ebe913de976bdb","user":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":17165658,"node_id":"MDEwOlJlcG9zaXRvcnkxNzE2NTY1OA==","name":"spark","full_name":"apache/spark","private":false,"owner":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/apache/spark","description":"Apache Spark","fork":false,"url":"https://api.github.com/repos/apache/spark","forks_url":"https://api.github.com/repos/apache/spark/forks","keys_url":"https://api.github.com/repos/apache/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/spark/teams","hooks_url":"https://api.github.com/repos/apache/spark/hooks","issue_events_url":"https://api.github.com/repos/apache/spark/issues/events{/number}","events_url":"https://api.github.com/repos/apache/spark/events","assignees_url":"https://api.github.com/repos/apache/spark/assignees{/user}","branches_url":"https://api.github.com/repos/apache/spark/branches{/branch}","tags_url":"https://api.github.com/repos/apache/spark/tags","blobs_url":"https://api.github.com/repos/apache/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/spark/languages","stargazers_url":"https://api.github.com/repos/apache/spark/stargazers","contributors_url":"https://api.github.com/repos/apache/spark/contributors","subscribers_url":"https://api.github.com/repos/apache/spark/subscribers","subscription_url":"https://api.github.com/repos/apache/spark/subscription","commits_url":"https://api.github.com/repos/apache/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/spark/contents/{+path}","compare_url":"https://api.github.com/repos/apache/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/spark/merges","archive_url":"https://api.github.com/repos/apache/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/spark/downloads","issues_url":"https://api.github.com/repos/apache/spark/issues{/number}","pulls_url":"https://api.github.com/repos/apache/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/spark/labels{/name}","releases_url":"https://api.github.com/repos/apache/spark/releases{/id}","deployments_url":"https://api.github.com/repos/apache/spark/deployments","created_at":"2014-02-25T08:00:08Z","updated_at":"2018-12-27T03:11:09Z","pushed_at":"2018-12-27T03:10:15Z","git_url":"git://github.com/apache/spark.git","ssh_url":"git@github.com:apache/spark.git","clone_url":"https://github.com/apache/spark.git","svn_url":"https://github.com/apache/spark","homepage":"","size":289953,"stargazers_count":20022,"watchers_count":20022,"language":"Scala","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":17782,"mirror_url":null,"archived":false,"open_issues_count":457,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":17782,"open_issues":457,"watchers":20022,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/23358"},"html":{"href":"https://github.com/apache/spark/pull/23358"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/23358"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/23358/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/23358/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/23358/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/0e1afc3f893529c579c737702b42af1d31f5bd63"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":21,"review_comments":28,"maintainer_can_modify":false,"commits":25,"additions":122,"deletions":75,"changed_files":15}}
{"actor":{"display_login":"asfgit"}}