{"action":"created","comment":{"url":"https://api.github.com/repos/apache/beam/pulls/comments/238351907","pull_request_review_id":180872094,"id":238351907,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzODM1MTkwNw==","diff_hunk":"@@ -150,9 +439,20 @@ public static Object convertAvroFieldStrict(\n       @Nonnull org.apache.avro.Schema avroSchema,\n       @Nonnull Schema.FieldType fieldType) {\n \n-    org.apache.avro.Schema unwrapped = unwrapNullableSchema(avroSchema);\n+    TypeWithNullability type = new TypeWithNullability(avroSchema);\n+    LogicalType logicalType = LogicalTypes.fromSchema(type.type);\n+    if (logicalType != null) {\n+      if (logicalType instanceof LogicalTypes.Decimal) {\n+        BigDecimal bigDecimal =\n+            new Conversions.DecimalConversion()\n+                .fromBytes((ByteBuffer) value, type.type, logicalType);","path":"sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/utils/AvroUtils.java","position":null,"original_position":475,"commit_id":"400badd8f7a8a3f91c76589fb53f8aef18dc30d4","original_commit_id":"7d74987f2a43446e75c780fa0afa4cb35c6687e8","user":{"login":"reuvenlax","id":21071061,"node_id":"MDQ6VXNlcjIxMDcxMDYx","avatar_url":"https://avatars1.githubusercontent.com/u/21071061?v=4","gravatar_id":"","url":"https://api.github.com/users/reuvenlax","html_url":"https://github.com/reuvenlax","followers_url":"https://api.github.com/users/reuvenlax/followers","following_url":"https://api.github.com/users/reuvenlax/following{/other_user}","gists_url":"https://api.github.com/users/reuvenlax/gists{/gist_id}","starred_url":"https://api.github.com/users/reuvenlax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reuvenlax/subscriptions","organizations_url":"https://api.github.com/users/reuvenlax/orgs","repos_url":"https://api.github.com/users/reuvenlax/repos","events_url":"https://api.github.com/users/reuvenlax/events{/privacy}","received_events_url":"https://api.github.com/users/reuvenlax/received_events","type":"User","site_admin":false},"body":"good catch here!","created_at":"2018-12-03T16:57:37Z","updated_at":"2018-12-03T16:57:37Z","html_url":"https://github.com/apache/beam/pull/7181#discussion_r238351907","pull_request_url":"https://api.github.com/repos/apache/beam/pulls/7181","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/beam/pulls/comments/238351907"},"html":{"href":"https://github.com/apache/beam/pull/7181#discussion_r238351907"},"pull_request":{"href":"https://api.github.com/repos/apache/beam/pulls/7181"}},"in_reply_to_id":238261525},"pull_request":{"url":"https://api.github.com/repos/apache/beam/pulls/7181","id":235241176,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM1MjQxMTc2","html_url":"https://github.com/apache/beam/pull/7181","diff_url":"https://github.com/apache/beam/pull/7181.diff","patch_url":"https://github.com/apache/beam/pull/7181.patch","issue_url":"https://api.github.com/repos/apache/beam/issues/7181","number":7181,"state":"open","locked":false,"title":"[BEAM-4454] Add more AVRO utilities to convert between Beam and Avro.","user":{"login":"reuvenlax","id":21071061,"node_id":"MDQ6VXNlcjIxMDcxMDYx","avatar_url":"https://avatars1.githubusercontent.com/u/21071061?v=4","gravatar_id":"","url":"https://api.github.com/users/reuvenlax","html_url":"https://github.com/reuvenlax","followers_url":"https://api.github.com/users/reuvenlax/followers","following_url":"https://api.github.com/users/reuvenlax/following{/other_user}","gists_url":"https://api.github.com/users/reuvenlax/gists{/gist_id}","starred_url":"https://api.github.com/users/reuvenlax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reuvenlax/subscriptions","organizations_url":"https://api.github.com/users/reuvenlax/orgs","repos_url":"https://api.github.com/users/reuvenlax/repos","events_url":"https://api.github.com/users/reuvenlax/events{/privacy}","received_events_url":"https://api.github.com/users/reuvenlax/received_events","type":"User","site_admin":false},"body":"This PR extends the Avro <-> Beam conversion utilities. It adds conversions between the different schema types as well as from Beam Row to GenericRecord. In addition nullability support was extended to handle the case of nullable list and map element values.\r\n\r\nThis PR does not add support for SpecificRecord. SpecificRecord will be handled by extending our existing ByteBuddy codegen for Java Bean objects (as SpecificRecord is basically a Java Bean). \r\n\r\nNext steps will be to extend AvroIO (as well as other sources such as PubsubIO.readAvros) to register the correct schema on the output PCollection. Once this happens, all these PCollections will automatically work on any schema-aware transform.","created_at":"2018-12-02T06:33:03Z","updated_at":"2018-12-03T16:57:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b2d0314074c6c00ee67ef2d1ea301223842d7c50","assignee":null,"assignees":[],"requested_reviewers":[{"login":"akedin","id":33067037,"node_id":"MDQ6VXNlcjMzMDY3MDM3","avatar_url":"https://avatars0.githubusercontent.com/u/33067037?v=4","gravatar_id":"","url":"https://api.github.com/users/akedin","html_url":"https://github.com/akedin","followers_url":"https://api.github.com/users/akedin/followers","following_url":"https://api.github.com/users/akedin/following{/other_user}","gists_url":"https://api.github.com/users/akedin/gists{/gist_id}","starred_url":"https://api.github.com/users/akedin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akedin/subscriptions","organizations_url":"https://api.github.com/users/akedin/orgs","repos_url":"https://api.github.com/users/akedin/repos","events_url":"https://api.github.com/users/akedin/events{/privacy}","received_events_url":"https://api.github.com/users/akedin/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/beam/pulls/7181/commits","review_comments_url":"https://api.github.com/repos/apache/beam/pulls/7181/comments","review_comment_url":"https://api.github.com/repos/apache/beam/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/beam/issues/7181/comments","statuses_url":"https://api.github.com/repos/apache/beam/statuses/400badd8f7a8a3f91c76589fb53f8aef18dc30d4","head":{"label":"reuvenlax:avro_schemas","ref":"avro_schemas","sha":"400badd8f7a8a3f91c76589fb53f8aef18dc30d4","user":{"login":"reuvenlax","id":21071061,"node_id":"MDQ6VXNlcjIxMDcxMDYx","avatar_url":"https://avatars1.githubusercontent.com/u/21071061?v=4","gravatar_id":"","url":"https://api.github.com/users/reuvenlax","html_url":"https://github.com/reuvenlax","followers_url":"https://api.github.com/users/reuvenlax/followers","following_url":"https://api.github.com/users/reuvenlax/following{/other_user}","gists_url":"https://api.github.com/users/reuvenlax/gists{/gist_id}","starred_url":"https://api.github.com/users/reuvenlax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reuvenlax/subscriptions","organizations_url":"https://api.github.com/users/reuvenlax/orgs","repos_url":"https://api.github.com/users/reuvenlax/repos","events_url":"https://api.github.com/users/reuvenlax/events{/privacy}","received_events_url":"https://api.github.com/users/reuvenlax/received_events","type":"User","site_admin":false},"repo":{"id":72963016,"node_id":"MDEwOlJlcG9zaXRvcnk3Mjk2MzAxNg==","name":"incubator-beam","full_name":"reuvenlax/incubator-beam","private":false,"owner":{"login":"reuvenlax","id":21071061,"node_id":"MDQ6VXNlcjIxMDcxMDYx","avatar_url":"https://avatars1.githubusercontent.com/u/21071061?v=4","gravatar_id":"","url":"https://api.github.com/users/reuvenlax","html_url":"https://github.com/reuvenlax","followers_url":"https://api.github.com/users/reuvenlax/followers","following_url":"https://api.github.com/users/reuvenlax/following{/other_user}","gists_url":"https://api.github.com/users/reuvenlax/gists{/gist_id}","starred_url":"https://api.github.com/users/reuvenlax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reuvenlax/subscriptions","organizations_url":"https://api.github.com/users/reuvenlax/orgs","repos_url":"https://api.github.com/users/reuvenlax/repos","events_url":"https://api.github.com/users/reuvenlax/events{/privacy}","received_events_url":"https://api.github.com/users/reuvenlax/received_events","type":"User","site_admin":false},"html_url":"https://github.com/reuvenlax/incubator-beam","description":"Mirror of Apache Beam (Incubating)","fork":true,"url":"https://api.github.com/repos/reuvenlax/incubator-beam","forks_url":"https://api.github.com/repos/reuvenlax/incubator-beam/forks","keys_url":"https://api.github.com/repos/reuvenlax/incubator-beam/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reuvenlax/incubator-beam/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reuvenlax/incubator-beam/teams","hooks_url":"https://api.github.com/repos/reuvenlax/incubator-beam/hooks","issue_events_url":"https://api.github.com/repos/reuvenlax/incubator-beam/issues/events{/number}","events_url":"https://api.github.com/repos/reuvenlax/incubator-beam/events","assignees_url":"https://api.github.com/repos/reuvenlax/incubator-beam/assignees{/user}","branches_url":"https://api.github.com/repos/reuvenlax/incubator-beam/branches{/branch}","tags_url":"https://api.github.com/repos/reuvenlax/incubator-beam/tags","blobs_url":"https://api.github.com/repos/reuvenlax/incubator-beam/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reuvenlax/incubator-beam/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reuvenlax/incubator-beam/git/refs{/sha}","trees_url":"https://api.github.com/repos/reuvenlax/incubator-beam/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reuvenlax/incubator-beam/statuses/{sha}","languages_url":"https://api.github.com/repos/reuvenlax/incubator-beam/languages","stargazers_url":"https://api.github.com/repos/reuvenlax/incubator-beam/stargazers","contributors_url":"https://api.github.com/repos/reuvenlax/incubator-beam/contributors","subscribers_url":"https://api.github.com/repos/reuvenlax/incubator-beam/subscribers","subscription_url":"https://api.github.com/repos/reuvenlax/incubator-beam/subscription","commits_url":"https://api.github.com/repos/reuvenlax/incubator-beam/commits{/sha}","git_commits_url":"https://api.github.com/repos/reuvenlax/incubator-beam/git/commits{/sha}","comments_url":"https://api.github.com/repos/reuvenlax/incubator-beam/comments{/number}","issue_comment_url":"https://api.github.com/repos/reuvenlax/incubator-beam/issues/comments{/number}","contents_url":"https://api.github.com/repos/reuvenlax/incubator-beam/contents/{+path}","compare_url":"https://api.github.com/repos/reuvenlax/incubator-beam/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reuvenlax/incubator-beam/merges","archive_url":"https://api.github.com/repos/reuvenlax/incubator-beam/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reuvenlax/incubator-beam/downloads","issues_url":"https://api.github.com/repos/reuvenlax/incubator-beam/issues{/number}","pulls_url":"https://api.github.com/repos/reuvenlax/incubator-beam/pulls{/number}","milestones_url":"https://api.github.com/repos/reuvenlax/incubator-beam/milestones{/number}","notifications_url":"https://api.github.com/repos/reuvenlax/incubator-beam/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reuvenlax/incubator-beam/labels{/name}","releases_url":"https://api.github.com/repos/reuvenlax/incubator-beam/releases{/id}","deployments_url":"https://api.github.com/repos/reuvenlax/incubator-beam/deployments","created_at":"2016-11-06T01:16:14Z","updated_at":"2016-11-06T01:16:20Z","pushed_at":"2018-12-03T16:57:03Z","git_url":"git://github.com/reuvenlax/incubator-beam.git","ssh_url":"git@github.com:reuvenlax/incubator-beam.git","clone_url":"https://github.com/reuvenlax/incubator-beam.git","svn_url":"https://github.com/reuvenlax/incubator-beam","homepage":null,"size":111251,"stargazers_count":0,"watchers_count":0,"language":"Java","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":0,"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":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"60cc4c18a0fdaeefcb16dbde9253375c1078d2b5","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":50904245,"node_id":"MDEwOlJlcG9zaXRvcnk1MDkwNDI0NQ==","name":"beam","full_name":"apache/beam","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/beam","description":"Apache Beam","fork":false,"url":"https://api.github.com/repos/apache/beam","forks_url":"https://api.github.com/repos/apache/beam/forks","keys_url":"https://api.github.com/repos/apache/beam/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/beam/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/beam/teams","hooks_url":"https://api.github.com/repos/apache/beam/hooks","issue_events_url":"https://api.github.com/repos/apache/beam/issues/events{/number}","events_url":"https://api.github.com/repos/apache/beam/events","assignees_url":"https://api.github.com/repos/apache/beam/assignees{/user}","branches_url":"https://api.github.com/repos/apache/beam/branches{/branch}","tags_url":"https://api.github.com/repos/apache/beam/tags","blobs_url":"https://api.github.com/repos/apache/beam/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/beam/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/beam/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/beam/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/beam/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/beam/languages","stargazers_url":"https://api.github.com/repos/apache/beam/stargazers","contributors_url":"https://api.github.com/repos/apache/beam/contributors","subscribers_url":"https://api.github.com/repos/apache/beam/subscribers","subscription_url":"https://api.github.com/repos/apache/beam/subscription","commits_url":"https://api.github.com/repos/apache/beam/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/beam/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/beam/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/beam/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/beam/contents/{+path}","compare_url":"https://api.github.com/repos/apache/beam/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/beam/merges","archive_url":"https://api.github.com/repos/apache/beam/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/beam/downloads","issues_url":"https://api.github.com/repos/apache/beam/issues{/number}","pulls_url":"https://api.github.com/repos/apache/beam/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/beam/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/beam/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/beam/labels{/name}","releases_url":"https://api.github.com/repos/apache/beam/releases{/id}","deployments_url":"https://api.github.com/repos/apache/beam/deployments","created_at":"2016-02-02T08:00:06Z","updated_at":"2018-12-03T16:14:56Z","pushed_at":"2018-12-03T16:57:05Z","git_url":"git://github.com/apache/beam.git","ssh_url":"git@github.com:apache/beam.git","clone_url":"https://github.com/apache/beam.git","svn_url":"https://github.com/apache/beam","homepage":"https://beam.apache.org","size":113054,"stargazers_count":2361,"watchers_count":2361,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1486,"mirror_url":null,"archived":false,"open_issues_count":76,"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":1486,"open_issues":76,"watchers":2361,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/beam/pulls/7181"},"html":{"href":"https://github.com/apache/beam/pull/7181"},"issue":{"href":"https://api.github.com/repos/apache/beam/issues/7181"},"comments":{"href":"https://api.github.com/repos/apache/beam/issues/7181/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/beam/pulls/7181/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/beam/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/beam/pulls/7181/commits"},"statuses":{"href":"https://api.github.com/repos/apache/beam/statuses/400badd8f7a8a3f91c76589fb53f8aef18dc30d4"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"reuvenlax"}}