Hi Rocco Thanks for bringing this discussion.
In the context of multiple languages support (python, rust, go, java, ...), I'm more in favour of 1 (updating the docs). Implementations can deal with that. Regards JB On Thu, Oct 31, 2024 at 6:40 PM Rocco Varela <rocco.var...@gmail.com> wrote: > > Hi everyone, > > Apologize if this is landing twice, my first attempt got lost somewhere in > transit :) > > I have a PR that attempts to address > https://github.com/apache/iceberg/issues/4849, basically adding logic to > ignore downcasting column types when "mergeSchema" is set when an existing > column type is long and the new schema has an int type for the same column. > > My solution involves updates to UnionByNameVisitor and this may end up > changing the behavior of our public api in a way that hasn't previously been > documented. > > Questions raised during the review is whether we should do one of the > following: > > Update our docs in UpdateSchema.unionByNameWith and callout something like > "We ignore differences in type if the new type is narrower than the existing > type", or > We add a new api UpdateSchema.unionByNameWith(Schema newSchema, boolean > ignoreTypeNarrowing) > > > Any feedback would be appreciated, thanks for your time. > > Cheers, > > --Rocco