For Avro, we can infer name mapping in the following scenario. As per @rdblue
- If there is a name mapping in table metadata, pass it in
- Otherwise, if the incoming schema has no field IDs, infer a mapping from the current schema and use it
- Otherwise the schema has at least one column ID, so no inferred mapping should be used