{"record":{"id":"088e53503729ee8c","repo":"pola-rs/polars","slug":"use-of-how-outer-should-be-replaced-with-how-full","errorCode":null,"errorMessage":"use of `how='outer'` should be replaced with `how='full'`.","messagePattern":"use of `how='outer'` should be replaced with `how='full'`\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"py-polars/src/polars/lazyframe/frame.py","lineNumber":6240,"sourceCode":"        uses_right_on = right_on is not None\n        uses_lr_on = uses_left_on or uses_right_on\n        if uses_on and uses_lr_on:\n            msg = \"cannot use 'on' in conjunction with 'left_on' or 'right_on'\"\n            raise ValueError(msg)\n        elif uses_left_on != uses_right_on:\n            msg = \"'left_on' requires corresponding 'right_on'\"\n            raise ValueError(msg)\n\n        if how == \"outer\":  # type: ignore[comparison-overlap]\n            msg = \"use of `how='outer'` should be replaced with `how='full'`.\"\n            raise ValueError(msg)\n        elif how == \"outer_coalesce\":  # type: ignore[comparison-overlap]\n            msg = \"use of `how='outer_coalesce'` should be replaced with `how='full', coalesce=True`.\"\n            raise ValueError(msg)\n        elif how == \"cross\":\n            if uses_on or uses_lr_on:\n                msg = \"cross join should not pass join keys\"\n                raise ValueError(msg)\n            return self._from_pyldf(\n                self._ldf.join(\n                    other._ldf,\n                    [],\n                    [],\n                    allow_parallel,\n                    force_parallel,\n                    nulls_equal,\n                    how,\n                    suffix,\n                    validate,\n                    maintain_order,\n                    build_side=build_side,\n                    coalesce=None,\n                )\n            )\n\n        if uses_on:","sourceCodeStart":6222,"sourceCodeEnd":6258,"githubUrl":"https://github.com/pola-rs/polars/blob/fe841f959ef4d2ceefc05a310d33ed7b1ab24e5e/py-polars/src/polars/lazyframe/frame.py#L6222-L6258","documentation":"Deprecation/removal guard in LazyFrame.join: 'outer' is the old name for the full outer join. polaris renamed the strategy to 'full' (because 'outer' was ambiguous across ecosystems), so passing how='outer' is intercepted after the on/left_on/right_on consistency checks and rejected with a pointer to the replacement.","triggerScenarios":"Calling lf.join(other, on='id', how='outer') on a Polars version where 'outer' was removed in favor of 'full' (Polars 1.0 renamed outer to full).","commonSituations":"Upgrading Polars after code written against pre-1.0 API; tutorials or Stack Overflow snippets using the old name; porting pandas-style 'outer' merge vocabulary.","solutions":["Replace how='outer' with how='full'","If old behavior also dropped/coalesced keys, consider how='full', coalesce=True","Update any wrapper functions that pass join strategy through as a variable"],"exampleFix":"// before\ndf.join(other, on='id', how='outer')\n// after\ndf.join(other, on='id', how='full')","handlingStrategy":"validation","validationCode":"def safe_join(df, other, how, **kw):\n    if how == 'outer':\n        how = 'full'\n    return df.join(other, how=how, **kw)","typeGuard":"def is_valid_join_strategy(how) -> bool:\n    return how not in ('outer', 'outer_coalesce')","tryCatchPattern":"try:\n    out = df.join(other, on='id', how=how)\nexcept ValueError as e:\n    if \"how='outer'\" in str(e):\n        out = df.join(other, on='id', how='full')\n    else:\n        raise","preventionTips":["After upgrading Polars, grep for how='outer' and replace with 'full'","Pin Polars versions and read the 1.0 migration guide","Wrap join strategy constants in an enum/allowlist"],"tags":["polars","python","join","deprecation","version-upgrade"],"backgroundTag":"deprecated-api-usage","analyzedSha":"fe841f959ef4d2ceefc05a310d33ed7b1ab24e5e","analyzedAt":"2026-09-18T22:14:11.667Z","contentChangedAt":"2026-09-18T22:14:11.667Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}