Say we have a FOO table:
CREATE STRUCT MY_STRUCT(S1 INT)
CREATE TABLE FOO(A INT, B MY_STRUCT, PRIMARY KEY(A))
When executing this query:
The result set metadata will be correctly populated with the right underlying type names:
rs.getStruct(1).getStruct("B").getMetaData().getTypeName() == "MY_STRUCT"
However, with this query:
The type name is lost:
rs.getStruct("B").getMetaData().getTypeName() != "MY_STRUCT"
Note that the type name is working fine when projecting the column directly:
rs.getStruct("B").getMetaData().getTypeName() == "MY_STRUCT"