Skip to content

ORDER BY with NULLS FIRST or NULLS LAST but without ASC or DESC does not sort #3141

Backlog

Description

@mathiasrw
alasql('CREATE TABLE p (v INT); INSERT INTO p VALUES (2),(NULL),(1)');
alasql('SELECT COLUMN v FROM p ORDER BY v NULLS LAST');
alasql('SELECT COLUMN v FROM p ORDER BY v NULLS FIRST');
alasql.parse('SELECT v FROM p ORDER BY v NULLS LAST').toString();

Both give [2, null, 1], and the statement reads back as SELECT v FROM p ORDER BY last ASC.

SQLite gives 1, 2, NULL for NULLS LAST and NULL, 1, 2 for NULLS FIRST.

Fixed by #3172.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions