pola-rs/polars · error · NotImplementedError
`sink_ipc` is not supported by
Error message
`sink_ipc` is not supported by {type(self).__name__} What it means
`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.
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.
Example fix
// before
lf.sink_ipc("out.arrow", engine="custom")
// after
lf.sink_ipc("out.arrow", engine="streaming") Defensive patterns
Strategy: try-catch
Validate before calling
if type(engine_obj).sink_ipc is Engine.sink_ipc:
engine = "streaming" Type guard
def supports_ipc_sink(engine: object) -> bool:
return type(engine).sink_ipc is not Engine.sink_ipc Try / catch
try:
lf.sink_ipc(path, engine=eng)
except NotImplementedError:
lf.collect().write_ipc(path) Prevention
- Use engine='streaming' for IPC sinks
- Implement sink_ipc in custom engines
- Document engine capability requirements in pipelines
When it happens
Trigger: Calling `LazyFrame.sink_ipc(..., engine=<engine>)` with an engine that does not override `sink_ipc` (custom engine or base stub).
Common situations: Arrow IPC export jobs with a restricted/custom engine; porting sink code between engines.
Related errors
- `sink_csv` is not supported by
- `sink_ndjson` is not supported by
- `sink_parquet` is not supported by
- `collect_all_async` is not supported by
- `collect_all` is not supported by
AI-assisted analysis of pola-rs/polars@fe841f959e (2026-09-18).
Data as JSON: /api/errors/5e63c3a3d7e8cefb.
Report an issue: GitHub.
Appendix: source
Thrown at py-polars/src/polars/lazyframe/engine.py:227
self,
lf: LazyFrame,
path: str | Path | IO[bytes] | PartitionBy,
*,
compression: IpcCompression | None,
compat_level: CompatLevel | None,
record_batch_size: int | None,
maintain_order: bool,
storage_options: StorageOptionsDict | None,
credential_provider: CredentialProviderFunction | Literal["auto"] | None,
sync_on_close: SyncOnCloseMethod | None,
mkdir: bool,
optimizations: QueryOptFlags,
_record_batch_statistics: bool,
sinked_paths_callback: SinkedPathsCallback | None,
) -> None:
"""See :meth:`polars.LazyFrame.sink_ipc`."""
msg = f"`sink_ipc` is not supported by {type(self).__name__}"
raise NotImplementedError(msg)
def sink_csv(
self,
lf: LazyFrame,
path: str | Path | IO[bytes] | IO[str] | PartitionBy,
*,
include_bom: bool,
compression: Literal["uncompressed", "gzip", "zstd"],
compression_level: int | None,
check_extension: bool,
include_header: bool,
separator: str,
line_terminator: str,
quote_char: str,
batch_size: int,
datetime_format: str | None,
date_format: str | None,
time_format: str | None,View on GitHub (pinned to fe841f959e)