Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to create Left anti join physical plan due to SchemaError::FieldNotFound #4366

Closed
mingmwang opened this issue Nov 25, 2022 · 0 comments · Fixed by #5264
Closed

Failed to create Left anti join physical plan due to SchemaError::FieldNotFound #4366

mingmwang opened this issue Nov 25, 2022 · 0 comments · Fixed by #5264
Labels
bug Something isn't working

Comments

@mingmwang
Copy link
Contributor

Describe the bug
A clear and concise description of what the bug is.

        let ctx = create_join_context_with_null_ids("t1_id", "t2_id", repartition_joins).unwrap();
        let sql = "SELECT t1_id, t1_name FROM t1 WHERE NOT EXISTS (SELECT 1 FROM t2 WHERE t1_id = t2_id and t1_id > 11) ORDER BY t1_id";
        let actual = execute_to_batches(&ctx, sql).await;
        let expected = vec![
            "+-------+---------+",
            "| t1_id | t1_name |",
            "+-------+---------+",
            "| 11    | a       |",
            "| 11    | a       |",
            "| 33    | c       |",
            "|       | e       |",
            "+-------+---------+",
        ];
        assert_batches_eq!(expected, &actual);

called Result::unwrap() on an Err value: "SchemaError(FieldNotFound { field: Column { relation: Some("t1"), name: "t1_id" }, valid_fields: Some([Column { relation: Some("t2"), name: "t2_id" }]) }) at Creating physical plan for 'SELECT t1_id, t1_name FROM t1 WHERE NOT EXISTS (SELECT 1 FROM t2 WHERE t1_id = t2_id and t1_id > 11) ORDER BY t1_id': Sort: t1.t1_id ASC NULLS LAST\n Projection: t1.t1_id, t1.t1_name\n LeftAnti Join: t1.t1_id = t2.t2_id\n TableScan: t1 projection=[t1_id, t1_name]\n Filter: CAST(t1.t1_id AS Int64) > Int64(11)\n TableScan: t2 projection=[t2_id]"

To Reproduce
Steps to reproduce the behavior:

Expected behavior
A clear and concise description of what you expected to happen.

Additional context
Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant