Return-Path: X-Original-To: apmail-avro-dev-archive@www.apache.org Delivered-To: apmail-avro-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B6F59E219 for ; Thu, 31 Jan 2013 18:49:16 +0000 (UTC) Received: (qmail 59651 invoked by uid 500); 31 Jan 2013 18:49:16 -0000 Delivered-To: apmail-avro-dev-archive@avro.apache.org Received: (qmail 59547 invoked by uid 500); 31 Jan 2013 18:49:15 -0000 Mailing-List: contact dev-help@avro.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@avro.apache.org Delivered-To: mailing list dev@avro.apache.org Received: (qmail 59360 invoked by uid 99); 31 Jan 2013 18:49:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Jan 2013 18:49:15 +0000 Date: Thu, 31 Jan 2013 18:49:15 +0000 (UTC) From: "Doug Cutting (JIRA)" To: dev@avro.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AVRO-816) Schema Comparison Utils MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AVRO-816?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13567932#comment-13567932 ] Doug Cutting commented on AVRO-816: ----------------------------------- The patch still applies but tests no longer pass. I think both parts are useful and would be willing to commit this. Re-reading the comments, I think Scott's concern is that we (someday) also provide something like "intersection" rather than opposition to "union". I'd perhaps like to see the documentation improved. "subsume" and "unify" should be more clearly defined. > Schema Comparison Utils > ----------------------- > > Key: AVRO-816 > URL: https://issues.apache.org/jira/browse/AVRO-816 > Project: Avro > Issue Type: New Feature > Components: java > Reporter: Joe Crobak > Assignee: Joe Crobak > Priority: Minor > Attachments: AVRO-816.patch, AVRO-816.patch, AVRO-816.patch, AVRO-816.patch > > > From my post on the mailing list, and Doug's response: > {quote} > On 05/05/2011 10:29 AM, Joe Crobak wrote: > > We've recently come across a situation where we have two data files with > > different schemas that we'd like to process together using > > GenericDatumReader. One schema is promotable to the other, but not vice > > versa. We'd like to programmatically determine which of the schemas to > > use. I did a brief look through javadoc and tests, and I couldn't find > > any examples of checking if one schema is promotable to the other. Has > > anyone else come across this? > > > > For some context, we're considering patching AvroStorage [1] to remove > > the assumption that all files have the same schema. In our case, our > > schema has evolved in that a field that was an int was promoted to a long. > A boolean method that tells you if one schema is promotable to another > would work in this case, but would not help in cases where, e.g., > different fields had changed in different versions. For example, in > branched development, two branches might each add a distinct symbol to > an enum. So I think you might be better off with a method that, given > two schemas, returns their superset, a schema that can read data written > by either. > Such a method does not yet exist in Avro, but should not be difficult to > add. Please file an issue in Jira if this sounds of interest. > Doug > {quote} > I think it would be useful to have both of the methods that Doug mentioned in some sort of schema utils class. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira