{"action":"created","comment":{"url":"https://api.github.com/repos/ActianCorp/spark-vector/pulls/comments/55221821","id":55221821,"diff_hunk":"@@ -0,0 +1,76 @@\n+/*\n+ * Copyright 2016 Actian Corporation\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *   http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package com.actian.spark_vector.colbuffer.util\n+\n+import java.sql.Timestamp\n+import java.sql.Date\n+import java.util.Calendar\n+\n+import org.apache.spark.Logging\n+\n+/** Helper functions and constants for `Time` conversions. */\n+object TimeConversion {\n+\n+  final def timeInNanos(source: Timestamp): Long = {\n+    (source.getTime() / PowersOfTen(MillisecondsScale)) * PowersOfTen(NanosecondsScale) + source.getNanos()","path":"src/main/scala/com/actian/spark_vector/colbuffer/util/TimeConversion.scala","position":28,"original_position":28,"commit_id":"f7aea3a54f4286cc5f3700392f000369a56c944e","original_commit_id":"f7aea3a54f4286cc5f3700392f000369a56c944e","user":{"login":"and-costea","id":15726328,"avatar_url":"https://avatars.githubusercontent.com/u/15726328?v=3","gravatar_id":"","url":"https://api.github.com/users/and-costea","html_url":"https://github.com/and-costea","followers_url":"https://api.github.com/users/and-costea/followers","following_url":"https://api.github.com/users/and-costea/following{/other_user}","gists_url":"https://api.github.com/users/and-costea/gists{/gist_id}","starred_url":"https://api.github.com/users/and-costea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/and-costea/subscriptions","organizations_url":"https://api.github.com/users/and-costea/orgs","repos_url":"https://api.github.com/users/and-costea/repos","events_url":"https://api.github.com/users/and-costea/events{/privacy}","received_events_url":"https://api.github.com/users/and-costea/received_events","type":"User","site_admin":false},"body":"source.getTime .... source.getNanos","created_at":"2016-03-07T15:47:50Z","updated_at":"2016-03-07T15:47:50Z","html_url":"https://github.com/ActianCorp/spark-vector/pull/4#discussion_r55221821","pull_request_url":"https://api.github.com/repos/ActianCorp/spark-vector/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/ActianCorp/spark-vector/pulls/comments/55221821"},"html":{"href":"https://github.com/ActianCorp/spark-vector/pull/4#discussion_r55221821"},"pull_request":{"href":"https://api.github.com/repos/ActianCorp/spark-vector/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/ActianCorp/spark-vector/pulls/4","id":61393597,"html_url":"https://github.com/ActianCorp/spark-vector/pull/4","diff_url":"https://github.com/ActianCorp/spark-vector/pull/4.diff","patch_url":"https://github.com/ActianCorp/spark-vector/pull/4.patch","issue_url":"https://api.github.com/repos/ActianCorp/spark-vector/issues/4","number":4,"state":"open","locked":false,"title":"Scala implementation for the column buffering and serialization of Vector columns.","user":{"login":"cbarca","id":1218881,"avatar_url":"https://avatars.githubusercontent.com/u/1218881?v=3","gravatar_id":"","url":"https://api.github.com/users/cbarca","html_url":"https://github.com/cbarca","followers_url":"https://api.github.com/users/cbarca/followers","following_url":"https://api.github.com/users/cbarca/following{/other_user}","gists_url":"https://api.github.com/users/cbarca/gists{/gist_id}","starred_url":"https://api.github.com/users/cbarca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbarca/subscriptions","organizations_url":"https://api.github.com/users/cbarca/orgs","repos_url":"https://api.github.com/users/cbarca/repos","events_url":"https://api.github.com/users/cbarca/events{/privacy}","received_events_url":"https://api.github.com/users/cbarca/received_events","type":"User","site_admin":false},"body":"Migrating the Java written column buffering (and serialization) lib to Scala.\r\n\r\nUnit tests checked.\r\nFastload_spark tests checked.\r\n\r\nTODOS:\r\n- remove Java lib (I would prefer a new pull req for this)","created_at":"2016-03-02T12:34:44Z","updated_at":"2016-03-07T15:47:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b4ac089cc6be658b0ebe95e071349c6672c2a10c","assignee":{"login":"and-costea","id":15726328,"avatar_url":"https://avatars.githubusercontent.com/u/15726328?v=3","gravatar_id":"","url":"https://api.github.com/users/and-costea","html_url":"https://github.com/and-costea","followers_url":"https://api.github.com/users/and-costea/followers","following_url":"https://api.github.com/users/and-costea/following{/other_user}","gists_url":"https://api.github.com/users/and-costea/gists{/gist_id}","starred_url":"https://api.github.com/users/and-costea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/and-costea/subscriptions","organizations_url":"https://api.github.com/users/and-costea/orgs","repos_url":"https://api.github.com/users/and-costea/repos","events_url":"https://api.github.com/users/and-costea/events{/privacy}","received_events_url":"https://api.github.com/users/and-costea/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/ActianCorp/spark-vector/pulls/4/commits","review_comments_url":"https://api.github.com/repos/ActianCorp/spark-vector/pulls/4/comments","review_comment_url":"https://api.github.com/repos/ActianCorp/spark-vector/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ActianCorp/spark-vector/issues/4/comments","statuses_url":"https://api.github.com/repos/ActianCorp/spark-vector/statuses/f7aea3a54f4286cc5f3700392f000369a56c944e","head":{"label":"ActianCorp:dev-colbuff-scala","ref":"dev-colbuff-scala","sha":"f7aea3a54f4286cc5f3700392f000369a56c944e","user":{"login":"ActianCorp","id":11785919,"avatar_url":"https://avatars.githubusercontent.com/u/11785919?v=3","gravatar_id":"","url":"https://api.github.com/users/ActianCorp","html_url":"https://github.com/ActianCorp","followers_url":"https://api.github.com/users/ActianCorp/followers","following_url":"https://api.github.com/users/ActianCorp/following{/other_user}","gists_url":"https://api.github.com/users/ActianCorp/gists{/gist_id}","starred_url":"https://api.github.com/users/ActianCorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ActianCorp/subscriptions","organizations_url":"https://api.github.com/users/ActianCorp/orgs","repos_url":"https://api.github.com/users/ActianCorp/repos","events_url":"https://api.github.com/users/ActianCorp/events{/privacy}","received_events_url":"https://api.github.com/users/ActianCorp/received_events","type":"Organization","site_admin":false},"repo":{"id":51449838,"name":"spark-vector","full_name":"ActianCorp/spark-vector","owner":{"login":"ActianCorp","id":11785919,"avatar_url":"https://avatars.githubusercontent.com/u/11785919?v=3","gravatar_id":"","url":"https://api.github.com/users/ActianCorp","html_url":"https://github.com/ActianCorp","followers_url":"https://api.github.com/users/ActianCorp/followers","following_url":"https://api.github.com/users/ActianCorp/following{/other_user}","gists_url":"https://api.github.com/users/ActianCorp/gists{/gist_id}","starred_url":"https://api.github.com/users/ActianCorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ActianCorp/subscriptions","organizations_url":"https://api.github.com/users/ActianCorp/orgs","repos_url":"https://api.github.com/users/ActianCorp/repos","events_url":"https://api.github.com/users/ActianCorp/events{/privacy}","received_events_url":"https://api.github.com/users/ActianCorp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ActianCorp/spark-vector","description":"Repository for the Spark-Vector connector","fork":false,"url":"https://api.github.com/repos/ActianCorp/spark-vector","forks_url":"https://api.github.com/repos/ActianCorp/spark-vector/forks","keys_url":"https://api.github.com/repos/ActianCorp/spark-vector/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ActianCorp/spark-vector/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ActianCorp/spark-vector/teams","hooks_url":"https://api.github.com/repos/ActianCorp/spark-vector/hooks","issue_events_url":"https://api.github.com/repos/ActianCorp/spark-vector/issues/events{/number}","events_url":"https://api.github.com/repos/ActianCorp/spark-vector/events","assignees_url":"https://api.github.com/repos/ActianCorp/spark-vector/assignees{/user}","branches_url":"https://api.github.com/repos/ActianCorp/spark-vector/branches{/branch}","tags_url":"https://api.github.com/repos/ActianCorp/spark-vector/tags","blobs_url":"https://api.github.com/repos/ActianCorp/spark-vector/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ActianCorp/spark-vector/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ActianCorp/spark-vector/git/refs{/sha}","trees_url":"https://api.github.com/repos/ActianCorp/spark-vector/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ActianCorp/spark-vector/statuses/{sha}","languages_url":"https://api.github.com/repos/ActianCorp/spark-vector/languages","stargazers_url":"https://api.github.com/repos/ActianCorp/spark-vector/stargazers","contributors_url":"https://api.github.com/repos/ActianCorp/spark-vector/contributors","subscribers_url":"https://api.github.com/repos/ActianCorp/spark-vector/subscribers","subscription_url":"https://api.github.com/repos/ActianCorp/spark-vector/subscription","commits_url":"https://api.github.com/repos/ActianCorp/spark-vector/commits{/sha}","git_commits_url":"https://api.github.com/repos/ActianCorp/spark-vector/git/commits{/sha}","comments_url":"https://api.github.com/repos/ActianCorp/spark-vector/comments{/number}","issue_comment_url":"https://api.github.com/repos/ActianCorp/spark-vector/issues/comments{/number}","contents_url":"https://api.github.com/repos/ActianCorp/spark-vector/contents/{+path}","compare_url":"https://api.github.com/repos/ActianCorp/spark-vector/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ActianCorp/spark-vector/merges","archive_url":"https://api.github.com/repos/ActianCorp/spark-vector/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ActianCorp/spark-vector/downloads","issues_url":"https://api.github.com/repos/ActianCorp/spark-vector/issues{/number}","pulls_url":"https://api.github.com/repos/ActianCorp/spark-vector/pulls{/number}","milestones_url":"https://api.github.com/repos/ActianCorp/spark-vector/milestones{/number}","notifications_url":"https://api.github.com/repos/ActianCorp/spark-vector/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ActianCorp/spark-vector/labels{/name}","releases_url":"https://api.github.com/repos/ActianCorp/spark-vector/releases{/id}","deployments_url":"https://api.github.com/repos/ActianCorp/spark-vector/deployments","created_at":"2016-02-10T15:30:30Z","updated_at":"2016-02-10T16:01:55Z","pushed_at":"2016-03-07T12:21:36Z","git_url":"git://github.com/ActianCorp/spark-vector.git","ssh_url":"git@github.com:ActianCorp/spark-vector.git","clone_url":"https://github.com/ActianCorp/spark-vector.git","svn_url":"https://github.com/ActianCorp/spark-vector","homepage":null,"size":1164,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"ActianCorp:master","ref":"master","sha":"7f206626bf15acc9f30870bc0c83660f9308ea04","user":{"login":"ActianCorp","id":11785919,"avatar_url":"https://avatars.githubusercontent.com/u/11785919?v=3","gravatar_id":"","url":"https://api.github.com/users/ActianCorp","html_url":"https://github.com/ActianCorp","followers_url":"https://api.github.com/users/ActianCorp/followers","following_url":"https://api.github.com/users/ActianCorp/following{/other_user}","gists_url":"https://api.github.com/users/ActianCorp/gists{/gist_id}","starred_url":"https://api.github.com/users/ActianCorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ActianCorp/subscriptions","organizations_url":"https://api.github.com/users/ActianCorp/orgs","repos_url":"https://api.github.com/users/ActianCorp/repos","events_url":"https://api.github.com/users/ActianCorp/events{/privacy}","received_events_url":"https://api.github.com/users/ActianCorp/received_events","type":"Organization","site_admin":false},"repo":{"id":51449838,"name":"spark-vector","full_name":"ActianCorp/spark-vector","owner":{"login":"ActianCorp","id":11785919,"avatar_url":"https://avatars.githubusercontent.com/u/11785919?v=3","gravatar_id":"","url":"https://api.github.com/users/ActianCorp","html_url":"https://github.com/ActianCorp","followers_url":"https://api.github.com/users/ActianCorp/followers","following_url":"https://api.github.com/users/ActianCorp/following{/other_user}","gists_url":"https://api.github.com/users/ActianCorp/gists{/gist_id}","starred_url":"https://api.github.com/users/ActianCorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ActianCorp/subscriptions","organizations_url":"https://api.github.com/users/ActianCorp/orgs","repos_url":"https://api.github.com/users/ActianCorp/repos","events_url":"https://api.github.com/users/ActianCorp/events{/privacy}","received_events_url":"https://api.github.com/users/ActianCorp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ActianCorp/spark-vector","description":"Repository for the Spark-Vector connector","fork":false,"url":"https://api.github.com/repos/ActianCorp/spark-vector","forks_url":"https://api.github.com/repos/ActianCorp/spark-vector/forks","keys_url":"https://api.github.com/repos/ActianCorp/spark-vector/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ActianCorp/spark-vector/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ActianCorp/spark-vector/teams","hooks_url":"https://api.github.com/repos/ActianCorp/spark-vector/hooks","issue_events_url":"https://api.github.com/repos/ActianCorp/spark-vector/issues/events{/number}","events_url":"https://api.github.com/repos/ActianCorp/spark-vector/events","assignees_url":"https://api.github.com/repos/ActianCorp/spark-vector/assignees{/user}","branches_url":"https://api.github.com/repos/ActianCorp/spark-vector/branches{/branch}","tags_url":"https://api.github.com/repos/ActianCorp/spark-vector/tags","blobs_url":"https://api.github.com/repos/ActianCorp/spark-vector/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ActianCorp/spark-vector/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ActianCorp/spark-vector/git/refs{/sha}","trees_url":"https://api.github.com/repos/ActianCorp/spark-vector/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ActianCorp/spark-vector/statuses/{sha}","languages_url":"https://api.github.com/repos/ActianCorp/spark-vector/languages","stargazers_url":"https://api.github.com/repos/ActianCorp/spark-vector/stargazers","contributors_url":"https://api.github.com/repos/ActianCorp/spark-vector/contributors","subscribers_url":"https://api.github.com/repos/ActianCorp/spark-vector/subscribers","subscription_url":"https://api.github.com/repos/ActianCorp/spark-vector/subscription","commits_url":"https://api.github.com/repos/ActianCorp/spark-vector/commits{/sha}","git_commits_url":"https://api.github.com/repos/ActianCorp/spark-vector/git/commits{/sha}","comments_url":"https://api.github.com/repos/ActianCorp/spark-vector/comments{/number}","issue_comment_url":"https://api.github.com/repos/ActianCorp/spark-vector/issues/comments{/number}","contents_url":"https://api.github.com/repos/ActianCorp/spark-vector/contents/{+path}","compare_url":"https://api.github.com/repos/ActianCorp/spark-vector/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ActianCorp/spark-vector/merges","archive_url":"https://api.github.com/repos/ActianCorp/spark-vector/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ActianCorp/spark-vector/downloads","issues_url":"https://api.github.com/repos/ActianCorp/spark-vector/issues{/number}","pulls_url":"https://api.github.com/repos/ActianCorp/spark-vector/pulls{/number}","milestones_url":"https://api.github.com/repos/ActianCorp/spark-vector/milestones{/number}","notifications_url":"https://api.github.com/repos/ActianCorp/spark-vector/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ActianCorp/spark-vector/labels{/name}","releases_url":"https://api.github.com/repos/ActianCorp/spark-vector/releases{/id}","deployments_url":"https://api.github.com/repos/ActianCorp/spark-vector/deployments","created_at":"2016-02-10T15:30:30Z","updated_at":"2016-02-10T16:01:55Z","pushed_at":"2016-03-07T12:21:36Z","git_url":"git://github.com/ActianCorp/spark-vector.git","ssh_url":"git@github.com:ActianCorp/spark-vector.git","clone_url":"https://github.com/ActianCorp/spark-vector.git","svn_url":"https://github.com/ActianCorp/spark-vector","homepage":null,"size":1164,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ActianCorp/spark-vector/pulls/4"},"html":{"href":"https://github.com/ActianCorp/spark-vector/pull/4"},"issue":{"href":"https://api.github.com/repos/ActianCorp/spark-vector/issues/4"},"comments":{"href":"https://api.github.com/repos/ActianCorp/spark-vector/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/ActianCorp/spark-vector/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/ActianCorp/spark-vector/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ActianCorp/spark-vector/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/ActianCorp/spark-vector/statuses/f7aea3a54f4286cc5f3700392f000369a56c944e"}}}}