{"record":{"id":"91385e6c1613caf1","repo":"pola-rs/polars","slug":"sink-to-iceberg-table-with-sort-order","errorCode":null,"errorMessage":"sink to Iceberg table with sort order","messagePattern":"sink to Iceberg table with sort order","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"py-polars/src/polars/io/iceberg/_sink.py","lineNumber":141,"sourceCode":"        return wrap_ldf(lf._ldf.sink_iceberg(self))\n\n    def _attach_resolved_sink(self, plf: PyLazyFrame) -> PyLazyFrame:\n        from pyiceberg.table import TableProperties\n        from pyiceberg.utils.properties import property_as_bool, property_as_int\n\n        import polars as pl\n\n        table = self.table()\n        table_metadata = table.metadata\n        table_properties = table_metadata.properties\n\n        if table.spec().fields:\n            msg = \"sink to partitioned Iceberg table\"\n            raise NotImplementedError(msg)\n\n        if table.sort_order().fields:\n            msg = \"sink to Iceberg table with sort order\"\n            raise NotImplementedError(msg)\n\n        if location_provider_impl := table_properties.get(\n            TableProperties.WRITE_PY_LOCATION_PROVIDER_IMPL\n        ):\n            msg = (\n                \"sink to Iceberg table with custom location provider\"\n                f\" '{location_provider_impl}'\"\n            )\n            raise NotImplementedError(msg)\n\n        object_storage_enabled = property_as_bool(\n            table_properties,\n            TableProperties.OBJECT_STORE_ENABLED,\n            TableProperties.OBJECT_STORE_ENABLED_DEFAULT,\n        )\n        object_storage_partitioned_paths = (\n            property_as_bool(\n                table_properties,","sourceCodeStart":123,"sourceCodeEnd":159,"githubUrl":"https://github.com/pola-rs/polars/blob/df599052daf96e7a9cc30a3b0c6bd25d6947e3c0/py-polars/src/polars/io/iceberg/_sink.py#L123-L159","documentation":"Error \"sink to Iceberg table with sort order\" thrown in pola-rs/polars.","triggerScenarios":"Thrown at py-polars/src/polars/io/iceberg/_sink.py:141 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"df599052daf96e7a9cc30a3b0c6bd25d6947e3c0","analyzedAt":"2026-08-16T12:10:03.978Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}