should i file a bug about the current behavior, then? i'd be happy to do so, and i now have a fully-working self-contained code sample which demonstrates the problem.
(the alias mechanism should be sufficient for my purposes once this problem is resolved. and thanks for all the replies!) On Tue, Oct 5, 2010 at 10:21 AM, Doug Cutting <[email protected]> wrote: > On 10/04/2010 02:06 PM, Patrick Linehan wrote: > >> is this the expected behavior in this case? does this not seem to >> contradict the schema resolution portions of the spec? >> > > This is not the expected behavior. The expected behavior is that names > must match, but that doesn't seem to be enforced in this case. > > The concern is that one might, e.g., have Date and Time records that both > contain a long field of the same name, but one is milliseconds and one is > microseconds. One should thus not be able to read one into the other > without explicitly overriding the name match requirement. > > The alias mechanism was added to permit overriding this requirement. If > you want to read a file that contains instances of schema x and you have > schema y, then you can simply call y.addAlias("x") before reading the data. > Does that achieve what you want? > > Doug >
