Skip to content

Support FIRST, AFTER and LAST options for nested fields #24513

Open
@ebyhr

Description

@ebyhr

Follow-up of #20914. The PR supports position options only for top level columns.

Quote from #20914 (review):

The nested case is somewhat confusing. At first glance, it's not clear what y refers to in this statement:

ALTER TABLE t ADD COLUMN a.b.c BIGINT AFTER y

It's meant to be a field within a.b, but that's not immediately obvious. It could, as well, be a top-level column and the statement could be a short hand for creating all the required nested fields with the root a after y.

The following structure would be more natural, but it only works with AFTER and it's incompatible with how nested columns are handled in general:

ALTER TABLE t ADD COLUMN c BIGINT AFTER a.b.y

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions