Skip to content

A valid SQL query returned 'Schema error: ...' (SQLancer) #11635

Closed

Description

@2010YOUY01

Describe the bug

The following SQL query should be valid, not it's returning an error

Run in datafusion-cli:

/*DML*/CREATE TABLE t0(v0 BIGINT, v1 DOUBLE);
/*DML*/CREATE TABLE t1(v0 BIGINT, v1 STRING);
/*DML*/CREATE TABLE t5(v0 BIGINT, v1 STRING, v2 BIGINT, v3 STRING, v4 BOOLEAN);
> SELECT *
FROM t1
NATURAL JOIN t5
INNER JOIN t0 ON (t0.v1 + t5.v0) > 0
WHERE t0.v1 = t1.v0;

Schema error: No field named t5.v0. Valid fields are t1.v0, t1.v1, t5.v2, t5.v3, t5.v4, "CAST(t1.v0 AS Float64)", t0.v0, t0.v1.

To Reproduce

No response

Expected behavior

No response

Additional context

Found by SQLancer #11030

Activity

  1. Lordworms commented on Jul 25, 2024

    @Lordworms
    Contributor

    take

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions