Skip to content

SQL: Parse error in query containing cross join in subquery (fails at 0ae3bcf) #6369

@philrz

Description

@philrz

tl;dr

This SQL query now causes a parse error, but previously parsed ok and produced the expected result.

$ super -c "SELECT + + 0 AS col1 FROM ( tab2 cor0 CROSS JOIN tab1 AS cor1 );"
parse error at line 1, column 63:
SELECT + + 0 AS col1 FROM ( tab2 cor0 CROSS JOIN tab1 AS cor1 );
                                                          === ^ ===

Details

Repro is with super commit 0ae3bcf, which is associated with the merge of the changes in #6352. This issue was found via a sqllogictest.

The query was working at at commit d84d656, which was right before the merge of the changes in #6352. The test data needed for this repro is available if you have a local checkout of the sqllogic-ztests repo and cd to the appropriate test directory.

$ cd ztests/sqlite/random/aggregates/slt_good_86/ztests-1

$ super -version
Version: d84d65640

$ super -c "SELECT + + 0 AS col1 FROM ( tab2 cor0 CROSS JOIN tab1 AS cor1 );"
{col1:0}
{col1:0}
{col1:0}
{col1:0}
{col1:0}
{col1:0}
{col1:0}
{col1:0}
{col1:0}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions