Return-Path: Delivered-To: apmail-hadoop-avro-user-archive@minotaur.apache.org Received: (qmail 32089 invoked from network); 18 Aug 2009 15:54:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Aug 2009 15:54:20 -0000 Received: (qmail 78508 invoked by uid 500); 18 Aug 2009 15:54:38 -0000 Delivered-To: apmail-hadoop-avro-user-archive@hadoop.apache.org Received: (qmail 78201 invoked by uid 500); 18 Aug 2009 15:54:38 -0000 Mailing-List: contact avro-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: avro-user@hadoop.apache.org Delivered-To: mailing list avro-user@hadoop.apache.org Received: (qmail 77974 invoked by uid 99); 18 Aug 2009 15:54:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Aug 2009 15:54:38 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.9] (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 18 Aug 2009 15:53:42 +0000 Received: (qmail 31412 invoked by uid 99); 18 Aug 2009 15:53:01 -0000 Received: from localhost.apache.org (HELO [192.168.168.109]) (127.0.0.1) (smtp-auth username cutting, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Aug 2009 15:53:01 +0000 Message-ID: <4A8ACE6F.3010502@apache.org> Date: Tue, 18 Aug 2009 08:53:19 -0700 From: Doug Cutting User-Agent: Thunderbird 2.0.0.22 (X11/20090608) MIME-Version: 1.0 To: avro-user@hadoop.apache.org Subject: Re: mixing types using reflection References: <4A89A9D0.1020202@apache.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Eelco Hillenius wrote: >> It should also work to add new schemas to the list as you write the file, >> before adding records of each type. > > How would that work? Create a new writer (and discard the old one) > based on the union but reuse the output stream? Glancing at the code, it looks like one can simply keep a pointer to the list and add elements to it, but, again, I've not yet tested this. If you need to rely on this feature, we should add a unit test, to make sure it continues to work. Doug