{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/7226","labels_url":"https://api.github.com/repos/apache/spark/issues/7226/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/7226/comments","events_url":"https://api.github.com/repos/apache/spark/issues/7226/events","html_url":"https://github.com/apache/spark/pull/7226","id":93081755,"number":7226,"title":"[SPARK-8753][SQL] Create an IntervalType data type","user":{"login":"cloud-fan","id":3182036,"avatar_url":"https://avatars.githubusercontent.com/u/3182036?v=3","gravatar_id":"","url":"https://api.github.com/users/cloud-fan","html_url":"https://github.com/cloud-fan","followers_url":"https://api.github.com/users/cloud-fan/followers","following_url":"https://api.github.com/users/cloud-fan/following{/other_user}","gists_url":"https://api.github.com/users/cloud-fan/gists{/gist_id}","starred_url":"https://api.github.com/users/cloud-fan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloud-fan/subscriptions","organizations_url":"https://api.github.com/users/cloud-fan/orgs","repos_url":"https://api.github.com/users/cloud-fan/repos","events_url":"https://api.github.com/users/cloud-fan/events{/privacy}","received_events_url":"https://api.github.com/users/cloud-fan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":25,"created_at":"2015-07-05T06:11:52Z","updated_at":"2015-07-07T14:13:22Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/7226","html_url":"https://github.com/apache/spark/pull/7226","diff_url":"https://github.com/apache/spark/pull/7226.diff","patch_url":"https://github.com/apache/spark/pull/7226.patch"},"body":"We need a new data type to represent time intervals. Because we can't determine how many days in a month, so we need year-month interval type and day-time interval type, like hive did.\r\n\r\nHowever, we need a further discussion to decide the detail of interval type syntax. Hive support `interval '30-0' year to month` and `interval '3 0:0:0' day to second`. Oracle has a detail definition of [interval syntax](http://docs.oracle.com/cd/B19306_01/server.102/b14200/sql_elements003.htm#i38598), which is very similar to hive's.\r\n\r\nBecause we use number of 100ns as value of `TimestampType`, so it may not makes sense to support nano second unit.\r\n\r\nTODO:\r\n* complete the syntax of interval literal.\r\n* improve doc and test.\r\n"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/119217199","html_url":"https://github.com/apache/spark/pull/7226#issuecomment-119217199","issue_url":"https://api.github.com/repos/apache/spark/issues/7226","id":119217199,"user":{"login":"AmplabJenkins","id":4031291,"avatar_url":"https://avatars.githubusercontent.com/u/4031291?v=3","gravatar_id":"","url":"https://api.github.com/users/AmplabJenkins","html_url":"https://github.com/AmplabJenkins","followers_url":"https://api.github.com/users/AmplabJenkins/followers","following_url":"https://api.github.com/users/AmplabJenkins/following{/other_user}","gists_url":"https://api.github.com/users/AmplabJenkins/gists{/gist_id}","starred_url":"https://api.github.com/users/AmplabJenkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmplabJenkins/subscriptions","organizations_url":"https://api.github.com/users/AmplabJenkins/orgs","repos_url":"https://api.github.com/users/AmplabJenkins/repos","events_url":"https://api.github.com/users/AmplabJenkins/events{/privacy}","received_events_url":"https://api.github.com/users/AmplabJenkins/received_events","type":"User","site_admin":false},"created_at":"2015-07-07T14:13:22Z","updated_at":"2015-07-07T14:13:22Z","body":"Merged build started."}}