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
