polars 1.43+ rewrites concat(a, b, ...).select(len()) into col("len").cast(UInt128).sum().cast(IDX_DTYPE). libcudf has no 128-bit integer type (size_type is 32-bit, #13159), so UInt128 fails to translate. The sum never actually needs 128 bits, it's just widened so accumulation can't overflow, then narrowed back to IDX_DTYPE before materializing. No GPU-resident table holds anywhere near 2**64 rows, so cudf-polars represents it as UInt64 instead.
The fix (translate.py) only recognizes this one shape: an Agg named "sum", or a Cast whose child is Column("len"). Any other UInt128 usage still hits the generic NotImplementedError in datatype.py. If polars restructures this rewrite or introduces UInt128 elsewhere, the new shape won't match, and the query silently loses GPU acceleration instead of running there.
Also: polars' own Series.to_arrow() can't export real UInt128 data (ArrowInvalid: Invalid or unsupported format string: '_plu128'), so the dtype isn't fully Arrow-interoperable in polars itself yet either.
polars 1.43+ rewrites
concat(a, b, ...).select(len())intocol("len").cast(UInt128).sum().cast(IDX_DTYPE). libcudf has no 128-bit integer type (size_typeis 32-bit, #13159), soUInt128fails to translate. The sum never actually needs 128 bits, it's just widened so accumulation can't overflow, then narrowed back toIDX_DTYPEbefore materializing. No GPU-resident table holds anywhere near2**64rows, so cudf-polars represents it asUInt64instead.The fix (
translate.py) only recognizes this one shape: anAggnamed"sum", or aCastwhose child isColumn("len"). Any otherUInt128usage still hits the genericNotImplementedErrorindatatype.py. If polars restructures this rewrite or introducesUInt128elsewhere, the new shape won't match, and the query silently loses GPU acceleration instead of running there.Also: polars' own
Series.to_arrow()can't export realUInt128data (ArrowInvalid: Invalid or unsupported format string: '_plu128'), so the dtype isn't fully Arrow-interoperable in polars itself yet either.