We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug
The following query fails with SchemaError(FieldNotFound { qualifier: None, name: "j2_id", valid_fields: Some(["j1.j1_id", "j1.j1_string", "j3.j3_id", "j3.j3_string", "j1.j1_id", "j1.j1_string", "j3.j3_id", "j3.j3_string"]) }
SchemaError(FieldNotFound { qualifier: None, name: "j2_id", valid_fields: Some(["j1.j1_id", "j1.j1_string", "j3.j3_id", "j3.j3_string", "j1.j1_id", "j1.j1_string", "j3.j3_id", "j3.j3_string"]) }
SELECT j1_string, j2_string FROM j1, j2 WHERE j1_id = j2_id - 1 AND j2_id < (SELECT count(*) FROM j1, j3 WHERE j2_id = j1_id AND j1_id = j3_id)
To Reproduce
Add this test to sql/planner.rs:
sql/planner.rs
#[test] fn scalar_subquery_reference_outer_field() { let sql = "SELECT j1_string, j2_string \ FROM j1, j2 \ WHERE j1_id = j2_id - 1 \ AND j2_id < (SELECT count(*) \ FROM j1, j3 \ WHERE j2_id = j1_id \ AND j1_id = j3_id)"; let expected = "TBD"; quick_test(sql, &expected); }
Also, add these tables to MockContextProvider in the same file.
MockContextProvider
"j1" => Some(Schema::new(vec![ Field::new("j1_id", DataType::Int32, false), Field::new("j1_string", DataType::Utf8, false), ])), "j2" => Some(Schema::new(vec![ Field::new("j2_id", DataType::Int32, false), Field::new("j2_string", DataType::Utf8, false), ])), "j3" => Some(Schema::new(vec![ Field::new("j3_id", DataType::Int32, false), Field::new("j3_string", DataType::Utf8, false), ])),
Expected behavior Query should produce a valid plan.
Additional context None
The text was updated successfully, but these errors were encountered:
andygrove
Successfully merging a pull request may close this issue.
Describe the bug
The following query fails with
SchemaError(FieldNotFound { qualifier: None, name: "j2_id", valid_fields: Some(["j1.j1_id", "j1.j1_string", "j3.j3_id", "j3.j3_string", "j1.j1_id", "j1.j1_string", "j3.j3_id", "j3.j3_string"]) }
To Reproduce
Add this test to
sql/planner.rs
:Also, add these tables to
MockContextProvider
in the same file.Expected behavior
Query should produce a valid plan.
Additional context
None
The text was updated successfully, but these errors were encountered: