Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3AF9C200CDE for ; Tue, 25 Jul 2017 00:09:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3981F165D63; Mon, 24 Jul 2017 22:09:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 80C30165D62 for ; Tue, 25 Jul 2017 00:09:07 +0200 (CEST) Received: (qmail 83534 invoked by uid 500); 24 Jul 2017 22:09:06 -0000 Mailing-List: contact commits-help@beam.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@beam.apache.org Delivered-To: mailing list commits@beam.apache.org Received: (qmail 83525 invoked by uid 99); 24 Jul 2017 22:09:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Jul 2017 22:09:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id E3A60C030E for ; Mon, 24 Jul 2017 22:09:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 5E8gtKgzwgQN for ; Mon, 24 Jul 2017 22:09:04 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 1A1AD5FE37 for ; Mon, 24 Jul 2017 22:09:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id D238EE044C for ; Mon, 24 Jul 2017 22:09:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 547C523F7F for ; Mon, 24 Jul 2017 22:09:00 +0000 (UTC) Date: Mon, 24 Jul 2017 22:09:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: commits@beam.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (BEAM-2677) AvroIO.read without specifying a schema MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 24 Jul 2017 22:09:08 -0000 [ https://issues.apache.org/jira/browse/BEAM-2677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16099182#comment-16099182 ] ASF GitHub Bot commented on BEAM-2677: -------------------------------------- GitHub user jkff opened a pull request: https://github.com/apache/beam/pull/3632 [BEAM-2677] AvroIO.parseGenericRecords - schemaless AvroIO.read To be done properly, this PR needs https://github.com/apache/beam/pull/3549. R: @mairbek CC: @reuvenlax (please take a look at the API but hold off a full review until that PR is submitted) You can merge this pull request into a Git repository by running: $ git pull https://github.com/jkff/incubator-beam avroio-dynamic Alternatively you can review and apply these changes as the patch at: https://github.com/apache/beam/pull/3632.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #3632 ---- commit 8bcafd94a38d9ccb962acd809536ff4bfcf70036 Author: Eugene Kirpichov Date: 2017-07-24T22:07:15Z [BEAM-2677] AvroIO.parseGenericRecords - schemaless AvroIO.read ---- > AvroIO.read without specifying a schema > --------------------------------------- > > Key: BEAM-2677 > URL: https://issues.apache.org/jira/browse/BEAM-2677 > Project: Beam > Issue Type: Bug > Components: sdk-java-core > Reporter: Eugene Kirpichov > Assignee: Eugene Kirpichov > > Sometimes it is inconvenient to require the user of AvroIO.read/readAll to specify a Schema for the Avro files they are reading, especially if different files may have different schemas. > It is possible to read GenericRecord objects from an Avro file, however it is not possible to provide a Coder for GenericRecord without knowing the schema: a GenericRecord knows its schema so we can encode it into a byte array, but we can not decode it from a byte array without knowing the schema (and encoding the full schema together with every record would be impractical). > Instead, a reasonable approach is to treat schemaless GenericRecord as unencodable and use the same approach as JdbcIO - a user-specified parse callback. > Suggested API: AvroIO.parseGenericRecords(SerializableFunction parseFn).from(filepattern). > CC: [~mkhadikov] [~reuvenlax] -- This message was sent by Atlassian JIRA (v6.4.14#64029)