MCPcopy Create free account
hub / github.com/PRQL/prql / test_join_with_inaccessible_table

Function test_join_with_inaccessible_table

prqlc/prqlc/src/sql/gen_query.rs:891–906  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

889
890 #[test]
891 fn test_join_with_inaccessible_table() {
892 // issue #5280: join referencing table not accessible in current scope
893 let query = r#"
894 from c = companies
895 join ca = companies_addresses (c.tax_code == ca.company)
896 group c.tax_code (
897 join a = addresses (a.id == ca.address)
898 sort {-ca.created_at}
899 take 2..
900 )
901 sort tax_code
902 "#;
903
904 let err = crate::tests::compile(query).unwrap_err();
905 assert!(err.to_string().contains("not accessible in this context"));
906 }
907}

Callers

nothing calls this directly

Calls 1

compileFunction · 0.70

Tested by

no test coverage detected