hadoop-pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "pi song" <pi.so...@gmail.com>
Subject Schema Merging?
Date Mon, 21 Apr 2008 13:17:15 GMT
Dear Alan,

As I'm waiting for more Logical Operators, I have implemented more helper
methods for schema merging. There is no spec for this so I'm not sure if
this is what you want.

In the attached patch:-

*Schema.merge(Schema other, boolean otherTakesAliasPrecedence)   *
is used for recursively merging schemas.
*Schema.equals(Schema schema, Schema other, boolean relaxInner, boolean
relaxAlias)*             is used for recursively comparing schemas.
*Schema.mergeType(byte type1, byte
type2)
*is where the type promotion logic lives in

I also added a new equal method for FieldSchema because I think this line in
the existing equal() "if (schema != fs.schema) return false;" looks wrong!!
I'm willing to add a lot more unit tests if this is what you want.

Pi

Mime
View raw message