{"record":{"id":"db27a77830596c39","repo":"pathwaycom/pathway","slug":"the-interval-argument-of-a-join-should-be-of-a-typ","errorCode":null,"errorMessage":"The interval argument of a join should be of a type pathway.temporal.Interval.","messagePattern":"The interval argument of a join should be of a type pathway\\.temporal\\.Interval\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/pathway/internals/arg_handlers.py","lineNumber":160,"sourceCode":"                raise ValueError(\n                    \"direction argument of join should be of type asof_join.Direction.\"\n                )\n\n        if \"behavior\" in kwargs:\n            behavior = processed_kwargs[\"behavior\"] = kwargs.pop(\"behavior\")\n            from pathway.stdlib.temporal import CommonBehavior\n\n            if not isinstance(behavior, CommonBehavior):\n                raise ValueError(\n                    \"The behavior argument of join should be of type pathway.temporal.CommonBehavior.\"\n                )\n\n        if \"interval\" in kwargs:\n            from pathway.stdlib.temporal import Interval\n\n            interval = processed_kwargs[\"interval\"] = kwargs.pop(\"interval\")\n            if not isinstance(interval, Interval):\n                raise ValueError(\n                    \"The interval argument of a join should be of a type pathway.temporal.Interval.\"\n                )\n\n        if \"left_exactly_once\" in kwargs:\n            processed_kwargs[\"left_exactly_once\"] = kwargs.pop(\"left_exactly_once\")\n\n        if \"right_exactly_once\" in kwargs:\n            processed_kwargs[\"right_exactly_once\"] = kwargs.pop(\"right_exactly_once\")\n\n        if kwargs:\n            raise ValueError(\n                \"Join received extra kwargs.\\n\"\n                + \"You probably want to use TableLike.join(...).select(**kwargs) to compute output columns.\"\n            )\n        return (self, other, *on), processed_kwargs\n\n    return handler\n","sourceCodeStart":142,"sourceCodeEnd":178,"githubUrl":"https://github.com/pathwaycom/pathway/blob/fa2f74a4649b7c5908690cf60137263d8d80de5f/python/pathway/internals/arg_handlers.py#L142-L178","documentation":"The join argument preprocessor validates the `interval` kwarg for interval joins. It must be an instance of `pathway.stdlib.temporal.Interval` (e.g. `pw.temporal.interval(ms)`), which defines the join window tolerance. Passing a raw number (int/float/pandas.Timedelta) is rejected.","triggerScenarios":"Calling Table.join(..., interval=5000) or interval=pd.Timedelta(\"5s\") instead of interval=pw.temporal.interval(ms=5000).","commonSituations":"Developers porting SQL BETWEEN-join examples where the tolerance is a plain number; using pandas timedelta objects out of habit; older Pathway versions accepted raw values in interval joins so upgraded code breaks.","solutions":["Wrap the value: interval=pw.temporal.interval(ms=5000) (or us=..., s=..., minutes=... as supported).","Convert pd.Timedelta via its total milliseconds into pw.temporal.interval(ms=...).","Remove `interval` if you intended an as-of join and meant `behavior` instead."],"exampleFix":"# before\nt.join(right, left_time=lt, right_time=rt, interval=5000)\n\n# after\nimport pathway as pw\nt.join(right, left_time=lt, right_time=rt, interval=pw.temporal.interval(ms=5000))","handlingStrategy":"type-guard","validationCode":"from pathway.stdlib.temporal import Interval\nassert interval is None or isinstance(interval, Interval)","typeGuard":"from pathway.stdlib.temporal import Interval\n\ndef is_valid_interval(i) -> bool:\n    return i is None or isinstance(i, Interval)","tryCatchPattern":null,"preventionTips":["Always wrap tolerances with pw.temporal.interval(...).","Never pass pd.Timedelta or bare ints as interval."],"tags":["pathway","join","interval-join","argument-validation","type-error"],"backgroundTag":null,"analyzedSha":"fa2f74a4649b7c5908690cf60137263d8d80de5f","analyzedAt":"2026-08-15T01:48:17.006Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}