{"record":{"id":"faa94f240158579f","repo":"dbt-labs/dbt-core","slug":"a-join-can-not-be-both-inner-and-full-outer","errorCode":null,"errorMessage":"A join can not be both \"inner\" and \"full_outer\".","messagePattern":"A join can not be both \"inner\" and \"full_outer\"\\.","errorType":"validation","errorClass":"InvalidArgument","httpStatus":null,"severity":"error","filePath":"crates/dbt-agate/src/table.rs","lineNumber":1308,"sourceCode":"                    .unwrap_or(false);\n                let columns = iter.next_kwarg::<Option<&Value>>(\"columns\")?;\n                iter.finish()?;\n\n                let right_table = match right_table.downcast_object_ref::<AgateTable>() {\n                    Some(table) => table,\n                    None => {\n                        return Err(Error::new(\n                            ErrorKind::InvalidArgument,\n                            format!(\n                                \"Table.join: right_table must be a Table: {right_table} found instead\"\n                            ),\n                        ));\n                    }\n                };\n\n                let join_type = if inner {\n                    if full_outer {\n                        return Err(Error::new(\n                            ErrorKind::InvalidArgument,\n                            \"A join can not be both \\\"inner\\\" and \\\"full_outer\\\".\",\n                        ));\n                    }\n                    JoinType::Inner\n                } else if full_outer {\n                    JoinType::FullOuter\n                } else {\n                    JoinType::LeftOuter\n                };\n\n                let table = self.join(\n                    right_table,\n                    left_key,\n                    right_key,\n                    join_type,\n                    require_match,\n                    columns,","sourceCodeStart":1290,"sourceCodeEnd":1326,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-agate/src/table.rs#L1290-L1326","documentation":"Thrown by `Table.join()` when both `inner=True` and `full_outer=True` are passed. These join types are mutually exclusive — a join is either an inner join or a full outer join, not both — so the library raises this InvalidArgument error before performing the join.","triggerScenarios":"Calling `table.join(right, left_key, right_key, inner=True, full_outer=True)`, typically from code that builds join flags dynamically and sets both booleans.","commonSituations":"Programmatic join construction where flags accumulate from config or user options without a mutual-exclusion check; misunderstanding the boolean API (default join is already inner).","solutions":["Pass only one of `inner` or `full_outer` as True","Omit both flags for the default join behavior","Add validation in calling code that rejects conflicting join options","If you need a different join type, check the supported JoinType variants (inner, full_outer) and pick one"],"exampleFix":"// before\ntable.join(right, 'k', 'k', inner=True, full_outer=True)\n// after\ntable.join(right, 'k', 'k', inner=True)  # or full_outer=True, not both","handlingStrategy":"validation","validationCode":"if inner and full_outer:\n    raise ValueError('inner and full_outer are mutually exclusive')","typeGuard":"null","tryCatchPattern":"try:\n    joined = table.join(right, lk, rk, inner=inner, full_outer=full_outer)\nexcept Exception as e:\n    if 'can not be both' in str(e):\n        raise ValueError('choose either inner or full_outer') from e\n    raise","preventionTips":["Build join flags from a single mutually exclusive enum/option","Never set both boolean join flags from user config without a check","Remember the default join is already inner"],"tags":["rust","argument-validation","join"],"backgroundTag":"mutually-exclusive-flags","analyzedSha":"0267ce9170576975b76b64ce856b2e5848e96617","analyzedAt":"2026-09-07T21:53:39.732Z","contentChangedAt":"2026-09-07T21:53:39.732Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}