{"record":{"id":"5e63c3a3d7e8cefb","repo":"pola-rs/polars","slug":"sink-ipc-is-not-supported-by-type-self-name","errorCode":null,"errorMessage":"`sink_ipc` is not supported by {type(self).__name__}","messagePattern":"`sink_ipc` is not supported by (.+?)","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"py-polars/src/polars/lazyframe/engine.py","lineNumber":227,"sourceCode":"        self,\n        lf: LazyFrame,\n        path: str | Path | IO[bytes] | PartitionBy,\n        *,\n        compression: IpcCompression | None,\n        compat_level: CompatLevel | None,\n        record_batch_size: int | None,\n        maintain_order: bool,\n        storage_options: StorageOptionsDict | None,\n        credential_provider: CredentialProviderFunction | Literal[\"auto\"] | None,\n        sync_on_close: SyncOnCloseMethod | None,\n        mkdir: bool,\n        optimizations: QueryOptFlags,\n        _record_batch_statistics: bool,\n        sinked_paths_callback: SinkedPathsCallback | None,\n    ) -> None:\n        \"\"\"See :meth:`polars.LazyFrame.sink_ipc`.\"\"\"\n        msg = f\"`sink_ipc` is not supported by {type(self).__name__}\"\n        raise NotImplementedError(msg)\n\n    def sink_csv(\n        self,\n        lf: LazyFrame,\n        path: str | Path | IO[bytes] | IO[str] | PartitionBy,\n        *,\n        include_bom: bool,\n        compression: Literal[\"uncompressed\", \"gzip\", \"zstd\"],\n        compression_level: int | None,\n        check_extension: bool,\n        include_header: bool,\n        separator: str,\n        line_terminator: str,\n        quote_char: str,\n        batch_size: int,\n        datetime_format: str | None,\n        date_format: str | None,\n        time_format: str | None,","sourceCodeStart":209,"sourceCodeEnd":245,"githubUrl":"https://github.com/pola-rs/polars/blob/fe841f959ef4d2ceefc05a310d33ed7b1ab24e5e/py-polars/src/polars/lazyframe/engine.py#L209-L245","documentation":"`sink_ipc` streams a LazyFrame to an Arrow IPC file; only sink-capable engines implement it. The base `Engine` implementation raises NotImplementedError with this message when the selected engine lacks the method.","triggerScenarios":"Calling `LazyFrame.sink_ipc(..., engine=<engine>)` with an engine that does not override `sink_ipc` (custom engine or base stub).","commonSituations":"Arrow IPC export jobs with a restricted/custom engine; porting sink code between engines.","solutions":["Use a sink-capable engine such as `engine='streaming'`.","Fall back to `lf.collect().write_ipc(path)`.","Implement `sink_ipc` in your custom Engine.","Check the engine's supported sink methods before calling."],"exampleFix":"// before\nlf.sink_ipc(\"out.arrow\", engine=\"custom\")\n// after\nlf.sink_ipc(\"out.arrow\", engine=\"streaming\")","handlingStrategy":"try-catch","validationCode":"if type(engine_obj).sink_ipc is Engine.sink_ipc:\n    engine = \"streaming\"","typeGuard":"def supports_ipc_sink(engine: object) -> bool:\n    return type(engine).sink_ipc is not Engine.sink_ipc","tryCatchPattern":"try:\n    lf.sink_ipc(path, engine=eng)\nexcept NotImplementedError:\n    lf.collect().write_ipc(path)","preventionTips":["Use engine='streaming' for IPC sinks","Implement sink_ipc in custom engines","Document engine capability requirements in pipelines"],"tags":["python","polars","ipc","sink","not-implemented"],"backgroundTag":"method-not-implemented","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"}