Skip to content

[Query Engine] ORDER BY on non-projected column can produce incorrect cross-shard ordering #1135

Description

@murex971

Description

When ORDER BY references a column not present in the projected output, cross-shard ordering can be incorrect.

Example

SELECT id FROM users ORDER BY name;

In this case, PgDog resolves sort columns from RowDescription; if name is not present, the key may be skipped, causing incorrect global ordering.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions