{"action":"closed","number":233,"pull_request":{"url":"https://api.github.com/repos/SnappyDataInc/snappydata/pulls/233","id":68313084,"html_url":"https://github.com/SnappyDataInc/snappydata/pull/233","diff_url":"https://github.com/SnappyDataInc/snappydata/pull/233.diff","patch_url":"https://github.com/SnappyDataInc/snappydata/pull/233.patch","issue_url":"https://api.github.com/repos/SnappyDataInc/snappydata/issues/233","number":233,"state":"closed","locked":false,"title":"[SNAP-750] Serialization of complex types from JDBC","user":{"login":"sumwale","id":11540628,"avatar_url":"https://avatars.githubusercontent.com/u/11540628?v=3","gravatar_id":"","url":"https://api.github.com/users/sumwale","html_url":"https://github.com/sumwale","followers_url":"https://api.github.com/users/sumwale/followers","following_url":"https://api.github.com/users/sumwale/following{/other_user}","gists_url":"https://api.github.com/users/sumwale/gists{/gist_id}","starred_url":"https://api.github.com/users/sumwale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sumwale/subscriptions","organizations_url":"https://api.github.com/users/sumwale/orgs","repos_url":"https://api.github.com/users/sumwale/repos","events_url":"https://api.github.com/users/sumwale/events{/privacy}","received_events_url":"https://api.github.com/users/sumwale/received_events","type":"User","site_admin":false},"body":"## Changes proposed in this pull request\r\n\r\nThis adds support for serialization and deserialization of complex types (ARRAY, MAP, STRUCT) from JDBC clients for column tables. The storage in tables is as BLOB in the table and as returned in query results (or for inserts), so this is needed to allow both inserts from JDBC or get results properly instead of as a serialized blob.\r\n\r\n- Added new callback class implementation ComplexTypeSerializerImpl to allow serializing ARRAY, MAP, STRUCT types over a JDBC client connection that is compatible with Spark serialized forms as stored in BLOBs in GemXD\r\n- the main code is in the new methods added in CodeGeneration that generate code for the serialization portion while deserialization is handled\r\n- use CodeGeneration of serialization code for complex types with handling in SparkSQLExecuteImpl\r\n- also add checks to validate meta-data of the complex type only in first call or in all calls of\r\n  ComplexTypeSerializerImpl.deserialize\r\n- implementation of the new methods of ExternalCatalog in SnappyHiveCatalog to fetch the table schema\r\n  as JSON string; refactored schema loading code in SnappyStoreHiveCatalog for the same\r\n- use the new snappy SQL query hint \"complexTypeAsClob\" to use string representation of ARRAY, MAP, STRUCT\r\n  instead of fetching as blobs\r\n- multiple fixes to conversion of complex types to string representation\r\n- new tests in SplitClusterDUnit for the above: a) complex type serialization/deserialization,\r\n  b) testing new query hint to fetch values as strings instead, c) schema validation and expected failures\r\n  in mismatch\r\n- also removed the workaround of the system property \"scalaTest\" that skipped persistence of Hive metadata\r\n\r\n## Patch testing\r\n\r\nThe new split mode test in core, SplitClusterDUnitTest handles various scenarios of serialization, meta-data compatibility checks.\r\n\r\n## Other PRs \r\n\r\nI have branched this one from #232 so as to use the new test organization. Also depends on store https://github.com/SnappyDataInc/snappy-store/pull/53","created_at":"2016-04-29T00:57:33Z","updated_at":"2016-05-06T14:45:26Z","closed_at":"2016-05-06T14:45:26Z","merged_at":"2016-05-06T14:45:26Z","merge_commit_sha":"561bfd868d24a20323a58794bc10e5366ed8f770","assignee":{"login":"kneeraj","id":1151021,"avatar_url":"https://avatars.githubusercontent.com/u/1151021?v=3","gravatar_id":"","url":"https://api.github.com/users/kneeraj","html_url":"https://github.com/kneeraj","followers_url":"https://api.github.com/users/kneeraj/followers","following_url":"https://api.github.com/users/kneeraj/following{/other_user}","gists_url":"https://api.github.com/users/kneeraj/gists{/gist_id}","starred_url":"https://api.github.com/users/kneeraj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kneeraj/subscriptions","organizations_url":"https://api.github.com/users/kneeraj/orgs","repos_url":"https://api.github.com/users/kneeraj/repos","events_url":"https://api.github.com/users/kneeraj/events{/privacy}","received_events_url":"https://api.github.com/users/kneeraj/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/SnappyDataInc/snappydata/pulls/233/commits","review_comments_url":"https://api.github.com/repos/SnappyDataInc/snappydata/pulls/233/comments","review_comment_url":"https://api.github.com/repos/SnappyDataInc/snappydata/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SnappyDataInc/snappydata/issues/233/comments","statuses_url":"https://api.github.com/repos/SnappyDataInc/snappydata/statuses/74d17ed12d50ca82d377d7e56dd19611c5cc7c36","head":{"label":"SnappyDataInc:SNAP-750","ref":"SNAP-750","sha":"74d17ed12d50ca82d377d7e56dd19611c5cc7c36","user":{"login":"SnappyDataInc","id":11342682,"avatar_url":"https://avatars.githubusercontent.com/u/11342682?v=3","gravatar_id":"","url":"https://api.github.com/users/SnappyDataInc","html_url":"https://github.com/SnappyDataInc","followers_url":"https://api.github.com/users/SnappyDataInc/followers","following_url":"https://api.github.com/users/SnappyDataInc/following{/other_user}","gists_url":"https://api.github.com/users/SnappyDataInc/gists{/gist_id}","starred_url":"https://api.github.com/users/SnappyDataInc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SnappyDataInc/subscriptions","organizations_url":"https://api.github.com/users/SnappyDataInc/orgs","repos_url":"https://api.github.com/users/SnappyDataInc/repos","events_url":"https://api.github.com/users/SnappyDataInc/events{/privacy}","received_events_url":"https://api.github.com/users/SnappyDataInc/received_events","type":"Organization","site_admin":false},"repo":{"id":42580991,"name":"snappydata","full_name":"SnappyDataInc/snappydata","owner":{"login":"SnappyDataInc","id":11342682,"avatar_url":"https://avatars.githubusercontent.com/u/11342682?v=3","gravatar_id":"","url":"https://api.github.com/users/SnappyDataInc","html_url":"https://github.com/SnappyDataInc","followers_url":"https://api.github.com/users/SnappyDataInc/followers","following_url":"https://api.github.com/users/SnappyDataInc/following{/other_user}","gists_url":"https://api.github.com/users/SnappyDataInc/gists{/gist_id}","starred_url":"https://api.github.com/users/SnappyDataInc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SnappyDataInc/subscriptions","organizations_url":"https://api.github.com/users/SnappyDataInc/orgs","repos_url":"https://api.github.com/users/SnappyDataInc/repos","events_url":"https://api.github.com/users/SnappyDataInc/events{/privacy}","received_events_url":"https://api.github.com/users/SnappyDataInc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SnappyDataInc/snappydata","description":"SnappyData: OLTP + OLAP Database built on Apache Spark","fork":false,"url":"https://api.github.com/repos/SnappyDataInc/snappydata","forks_url":"https://api.github.com/repos/SnappyDataInc/snappydata/forks","keys_url":"https://api.github.com/repos/SnappyDataInc/snappydata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SnappyDataInc/snappydata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SnappyDataInc/snappydata/teams","hooks_url":"https://api.github.com/repos/SnappyDataInc/snappydata/hooks","issue_events_url":"https://api.github.com/repos/SnappyDataInc/snappydata/issues/events{/number}","events_url":"https://api.github.com/repos/SnappyDataInc/snappydata/events","assignees_url":"https://api.github.com/repos/SnappyDataInc/snappydata/assignees{/user}","branches_url":"https://api.github.com/repos/SnappyDataInc/snappydata/branches{/branch}","tags_url":"https://api.github.com/repos/SnappyDataInc/snappydata/tags","blobs_url":"https://api.github.com/repos/SnappyDataInc/snappydata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SnappyDataInc/snappydata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SnappyDataInc/snappydata/git/refs{/sha}","trees_url":"https://api.github.com/repos/SnappyDataInc/snappydata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SnappyDataInc/snappydata/statuses/{sha}","languages_url":"https://api.github.com/repos/SnappyDataInc/snappydata/languages","stargazers_url":"https://api.github.com/repos/SnappyDataInc/snappydata/stargazers","contributors_url":"https://api.github.com/repos/SnappyDataInc/snappydata/contributors","subscribers_url":"https://api.github.com/repos/SnappyDataInc/snappydata/subscribers","subscription_url":"https://api.github.com/repos/SnappyDataInc/snappydata/subscription","commits_url":"https://api.github.com/repos/SnappyDataInc/snappydata/commits{/sha}","git_commits_url":"https://api.github.com/repos/SnappyDataInc/snappydata/git/commits{/sha}","comments_url":"https://api.github.com/repos/SnappyDataInc/snappydata/comments{/number}","issue_comment_url":"https://api.github.com/repos/SnappyDataInc/snappydata/issues/comments{/number}","contents_url":"https://api.github.com/repos/SnappyDataInc/snappydata/contents/{+path}","compare_url":"https://api.github.com/repos/SnappyDataInc/snappydata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SnappyDataInc/snappydata/merges","archive_url":"https://api.github.com/repos/SnappyDataInc/snappydata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SnappyDataInc/snappydata/downloads","issues_url":"https://api.github.com/repos/SnappyDataInc/snappydata/issues{/number}","pulls_url":"https://api.github.com/repos/SnappyDataInc/snappydata/pulls{/number}","milestones_url":"https://api.github.com/repos/SnappyDataInc/snappydata/milestones{/number}","notifications_url":"https://api.github.com/repos/SnappyDataInc/snappydata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SnappyDataInc/snappydata/labels{/name}","releases_url":"https://api.github.com/repos/SnappyDataInc/snappydata/releases{/id}","deployments_url":"https://api.github.com/repos/SnappyDataInc/snappydata/deployments","created_at":"2015-09-16T10:36:36Z","updated_at":"2016-05-05T18:55:44Z","pushed_at":"2016-05-06T14:45:26Z","git_url":"git://github.com/SnappyDataInc/snappydata.git","ssh_url":"git@github.com:SnappyDataInc/snappydata.git","clone_url":"https://github.com/SnappyDataInc/snappydata.git","svn_url":"https://github.com/SnappyDataInc/snappydata","homepage":"http://www.snappydata.io","size":142459,"stargazers_count":275,"watchers_count":275,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":30,"mirror_url":null,"open_issues_count":8,"forks":30,"open_issues":8,"watchers":275,"default_branch":"master"}},"base":{"label":"SnappyDataInc:SNAP-753","ref":"SNAP-753","sha":"a3263ee4c411773f9f1682b8d93ab76da05e8022","user":{"login":"SnappyDataInc","id":11342682,"avatar_url":"https://avatars.githubusercontent.com/u/11342682?v=3","gravatar_id":"","url":"https://api.github.com/users/SnappyDataInc","html_url":"https://github.com/SnappyDataInc","followers_url":"https://api.github.com/users/SnappyDataInc/followers","following_url":"https://api.github.com/users/SnappyDataInc/following{/other_user}","gists_url":"https://api.github.com/users/SnappyDataInc/gists{/gist_id}","starred_url":"https://api.github.com/users/SnappyDataInc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SnappyDataInc/subscriptions","organizations_url":"https://api.github.com/users/SnappyDataInc/orgs","repos_url":"https://api.github.com/users/SnappyDataInc/repos","events_url":"https://api.github.com/users/SnappyDataInc/events{/privacy}","received_events_url":"https://api.github.com/users/SnappyDataInc/received_events","type":"Organization","site_admin":false},"repo":{"id":42580991,"name":"snappydata","full_name":"SnappyDataInc/snappydata","owner":{"login":"SnappyDataInc","id":11342682,"avatar_url":"https://avatars.githubusercontent.com/u/11342682?v=3","gravatar_id":"","url":"https://api.github.com/users/SnappyDataInc","html_url":"https://github.com/SnappyDataInc","followers_url":"https://api.github.com/users/SnappyDataInc/followers","following_url":"https://api.github.com/users/SnappyDataInc/following{/other_user}","gists_url":"https://api.github.com/users/SnappyDataInc/gists{/gist_id}","starred_url":"https://api.github.com/users/SnappyDataInc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SnappyDataInc/subscriptions","organizations_url":"https://api.github.com/users/SnappyDataInc/orgs","repos_url":"https://api.github.com/users/SnappyDataInc/repos","events_url":"https://api.github.com/users/SnappyDataInc/events{/privacy}","received_events_url":"https://api.github.com/users/SnappyDataInc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SnappyDataInc/snappydata","description":"SnappyData: OLTP + OLAP Database built on Apache Spark","fork":false,"url":"https://api.github.com/repos/SnappyDataInc/snappydata","forks_url":"https://api.github.com/repos/SnappyDataInc/snappydata/forks","keys_url":"https://api.github.com/repos/SnappyDataInc/snappydata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SnappyDataInc/snappydata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SnappyDataInc/snappydata/teams","hooks_url":"https://api.github.com/repos/SnappyDataInc/snappydata/hooks","issue_events_url":"https://api.github.com/repos/SnappyDataInc/snappydata/issues/events{/number}","events_url":"https://api.github.com/repos/SnappyDataInc/snappydata/events","assignees_url":"https://api.github.com/repos/SnappyDataInc/snappydata/assignees{/user}","branches_url":"https://api.github.com/repos/SnappyDataInc/snappydata/branches{/branch}","tags_url":"https://api.github.com/repos/SnappyDataInc/snappydata/tags","blobs_url":"https://api.github.com/repos/SnappyDataInc/snappydata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SnappyDataInc/snappydata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SnappyDataInc/snappydata/git/refs{/sha}","trees_url":"https://api.github.com/repos/SnappyDataInc/snappydata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SnappyDataInc/snappydata/statuses/{sha}","languages_url":"https://api.github.com/repos/SnappyDataInc/snappydata/languages","stargazers_url":"https://api.github.com/repos/SnappyDataInc/snappydata/stargazers","contributors_url":"https://api.github.com/repos/SnappyDataInc/snappydata/contributors","subscribers_url":"https://api.github.com/repos/SnappyDataInc/snappydata/subscribers","subscription_url":"https://api.github.com/repos/SnappyDataInc/snappydata/subscription","commits_url":"https://api.github.com/repos/SnappyDataInc/snappydata/commits{/sha}","git_commits_url":"https://api.github.com/repos/SnappyDataInc/snappydata/git/commits{/sha}","comments_url":"https://api.github.com/repos/SnappyDataInc/snappydata/comments{/number}","issue_comment_url":"https://api.github.com/repos/SnappyDataInc/snappydata/issues/comments{/number}","contents_url":"https://api.github.com/repos/SnappyDataInc/snappydata/contents/{+path}","compare_url":"https://api.github.com/repos/SnappyDataInc/snappydata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SnappyDataInc/snappydata/merges","archive_url":"https://api.github.com/repos/SnappyDataInc/snappydata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SnappyDataInc/snappydata/downloads","issues_url":"https://api.github.com/repos/SnappyDataInc/snappydata/issues{/number}","pulls_url":"https://api.github.com/repos/SnappyDataInc/snappydata/pulls{/number}","milestones_url":"https://api.github.com/repos/SnappyDataInc/snappydata/milestones{/number}","notifications_url":"https://api.github.com/repos/SnappyDataInc/snappydata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SnappyDataInc/snappydata/labels{/name}","releases_url":"https://api.github.com/repos/SnappyDataInc/snappydata/releases{/id}","deployments_url":"https://api.github.com/repos/SnappyDataInc/snappydata/deployments","created_at":"2015-09-16T10:36:36Z","updated_at":"2016-05-05T18:55:44Z","pushed_at":"2016-05-06T14:45:26Z","git_url":"git://github.com/SnappyDataInc/snappydata.git","ssh_url":"git@github.com:SnappyDataInc/snappydata.git","clone_url":"https://github.com/SnappyDataInc/snappydata.git","svn_url":"https://github.com/SnappyDataInc/snappydata","homepage":"http://www.snappydata.io","size":142459,"stargazers_count":275,"watchers_count":275,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":30,"mirror_url":null,"open_issues_count":8,"forks":30,"open_issues":8,"watchers":275,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SnappyDataInc/snappydata/pulls/233"},"html":{"href":"https://github.com/SnappyDataInc/snappydata/pull/233"},"issue":{"href":"https://api.github.com/repos/SnappyDataInc/snappydata/issues/233"},"comments":{"href":"https://api.github.com/repos/SnappyDataInc/snappydata/issues/233/comments"},"review_comments":{"href":"https://api.github.com/repos/SnappyDataInc/snappydata/pulls/233/comments"},"review_comment":{"href":"https://api.github.com/repos/SnappyDataInc/snappydata/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SnappyDataInc/snappydata/pulls/233/commits"},"statuses":{"href":"https://api.github.com/repos/SnappyDataInc/snappydata/statuses/74d17ed12d50ca82d377d7e56dd19611c5cc7c36"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"sumwale","id":11540628,"avatar_url":"https://avatars.githubusercontent.com/u/11540628?v=3","gravatar_id":"","url":"https://api.github.com/users/sumwale","html_url":"https://github.com/sumwale","followers_url":"https://api.github.com/users/sumwale/followers","following_url":"https://api.github.com/users/sumwale/following{/other_user}","gists_url":"https://api.github.com/users/sumwale/gists{/gist_id}","starred_url":"https://api.github.com/users/sumwale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sumwale/subscriptions","organizations_url":"https://api.github.com/users/sumwale/orgs","repos_url":"https://api.github.com/users/sumwale/repos","events_url":"https://api.github.com/users/sumwale/events{/privacy}","received_events_url":"https://api.github.com/users/sumwale/received_events","type":"User","site_admin":false},"comments":1,"review_comments":4,"commits":5,"additions":1300,"deletions":226,"changed_files":18}}