{"record":{"id":"d05d1d1924a58633","repo":"pathwaycom/pathway","slug":"statistical-diff-invalid-column-reference-for-t-d05d1d","errorCode":null,"errorMessage":"statistical.diff(): Invalid column reference for the parameter value.","messagePattern":"statistical\\.diff\\(\\): Invalid column reference for the parameter value\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/pathway/stdlib/ordered/diff.py","lineNumber":108,"sourceCode":"                \"statistical.diff(): Invalid column reference for the parameter timestamp,\"\n                + f\" found a string. Did you mean this.{timestamp} instead of {repr(timestamp)}?\"\n            )\n        raise ValueError(\n            \"statistical.diff(): Invalid column reference for the parameter timestamp.\"\n        )\n\n    ordered_table = self.sort(key=timestamp, instance=instance)\n\n    for value in values:\n        if isinstance(value, pw.ColumnReference):\n            value = self[value]\n        else:\n            if isinstance(value, str):\n                raise ValueError(\n                    \"statistical.diff(): Invalid column reference for the parameter value,\"\n                    + f\" found a string. Did you mean this.{value} instead of {repr(value)}?\"\n                )\n            raise ValueError(\n                \"statistical.diff(): Invalid column reference for the parameter value.\"\n            )\n\n        ordered_table += ordered_table.select(\n            diff=pw.require(\n                value\n                - pw.unwrap(self.ix(ordered_table.prev, optional=True)[value._name]),\n                value,\n                ordered_table.prev,\n            )\n        )\n\n        ordered_table = ordered_table.rename({\"diff\": \"diff_\" + value.name})\n\n    return ordered_table.without(ordered_table.prev, ordered_table.next)\n","sourceCodeStart":90,"sourceCodeEnd":124,"githubUrl":"https://github.com/pathwaycom/pathway/blob/fa2f74a4649b7c5908690cf60137263d8d80de5f/python/pathway/stdlib/ordered/diff.py#L90-L124","documentation":"Error \"statistical.diff(): Invalid column reference for the parameter value.\" thrown in pathwaycom/pathway.","triggerScenarios":"Thrown at python/pathway/stdlib/ordered/diff.py:108 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a ColumnReference for the value parameter (not a literal or other expression type)."],"exampleFix":"pw.stdlib.statistical.diff(this.timestamp, this.value)","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa2f74a4649b7c5908690cf60137263d8d80de5f","analyzedAt":"2026-08-15T01:48:17.006Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}