Skip to content

STRUCT type name lost in ResultSetMetaData when projecting * #3743

@arnaud-lacurie

Description

@arnaud-lacurie

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:

SELECT (*) FROM FOO

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:

SELECT * FROM FOO

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:

SELECT B FROM FOO
rs.getStruct("B").getMetaData().getTypeName() == "MY_STRUCT"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions