External Reflections shouldn't require exact schema matches

From a usability POV, if you have an external reflection that has a compatible but slightly different schema, it would be nice if Dremio silently accepted this rather than returning “External reflection schema does not match Dataset schema”. (Or even just reported the first difference to make debugging easier)

Currently, if the VDS is defined as “select a, b, c from SOURCE”, and the external source is defined as “select a, c, b, d”, an external reflection will be rejected (both because of the extra column, ‘d’, and also because ‘b’ and ‘c’ are re-ordered). It would be nice if these requirements could be relaxed. Specifically, it should be able to create an external reflection provided each column in the VDS appears in the external source (regardless of order or additional columns). Currently, the user has to define a view over the external source to re-order & remove the columns, then use this as the external reflection.

Alternatively, the documentation at https://docs.dremio.com/acceleration/creating-reflections.html#external-reflections could be updated to indicate that the VDS has to exactly match (even then, it looks like Dremio already tries to do some fungibility with null/not null columns).

The relevant code looks to be com/dremio/exec/planner/acceleration/ExternalMaterializationDescriptor.java / getMaterializationFor and com/dremio/exec/planner/common/MoreRelOptUtil.java / areRowTypesEqual.
I haven’t looked in detail (and am not familiar with the expectations of the surrounding code), but the existing call to MoreRelOptUtil.createCastRel may actually handle these requirements (so just loosening the verification may be all that’s required).