Note that this is a less precise tool than using sdf_explode and sdf_select
directly because all fields of the exploded array will be kept and promoted. Direct calls to these
methods allows for more targeted use of sdf_select to promote only those fields that
are wanted to the top level of the data frame.
Additionally, though sdf_select allows users to reach arbitrarily far into a nested
structure, this function will only reach one layer deep. It may well be that the unnested fields
are themselves nested structures that need to be dealt with accordingly.
Note that map types are supported, but there is no is_map argument. This is because the
function is doing schema interrogation of the input data anyway to determine whether an explode
operation is required (it is of maps and arrays, but not for bare structs). Given this the result
of the schema interrogation drives the value o is_map provided to sdf_explode.