You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Python][C++] Basic compute/comparison kernels missing for string_view? #49368
Describe the bug, including details regarding any error messages, version, and platform.
I have some code running pyarrow on top of deltalake. Whenever I try to upgrade pyarrow beyond 20.0.0, I'm always faced with variants of "Function 'equal' has no kernel matching input types (string_view, string_view)". This seems to happen anywhere there is a string column in the data.
Am I doing something well-known and stupid, or are string comparisons no longer supposed to be working in pyarrow?
changed the title [-]Basic compute/comparison kernels missing for string_view?[/-][+][Python][C++] Basic compute/comparison kernels missing for string_view?[/+]on Feb 23, 2026
Hi @haraldnh just to understand a little bit better. Could you share the pyarrow wheel that you are using? As far as I understand this should work but it is true that on Arrow 20.0.0 we split the compute library into its own shared library and this errors feels like the function registry hasn't registered the kernels properly. This should be automatic with PyArrow wheels provided but it is worth investigating whether there is an issue.
Is this only happening with PyArrow 20.0.0, what system? How are you installing PyArrow, could you share some details about the snippet you are using?
Sorry now that I take a closer look at the error it does not seem to be related at all. I am still interested on seeing a minimal reproducer to validate whether this is a regression. If we find something that used to work and now it doesn't work I can bisect to the exact cause.
It's also the other way around: It works up until 20.0.0, which is where the fields are 'string'. From 21.0.0 and onwards, things are 'string_view' and I have not been able to make things work.
I'm reading a deltalake, partitioned on a 'date' (formatted like "2026-02-23") and 'time' (formatted "12:30") fields. I then produce a partition-filter like:
Then feed this through dataset = deltalake.to_pyarrow_dataset(pfilter), and then data = dataset.to_table(columns). From the error, it seems to be the partition-filter comparison that crashes, but it only fails in to_table().
oh! I understand now! Columns that were read from Parquet as "strings" are now read as "string_view" and there are no kernels for those. Got it. This is probably due to:
Do you manage how those Parquet files are read or is deltalake managing it?
There's a new option binary_type which should drive this behavior. Using opts.binary_type == pa.binary() instead of opts.binary_type == pa.binary_view(). This should go back to the previous behavior unless, from what I understand, the files are stored with an Arrow Schema that says those are string view.
@pitrou is the above correct about the new binary_type option also driving the string behavior (not only binary columns)?
The real solution would be to provide Kernels though.
There's a new option binary_type which should drive this behavior. Using opts.binary_type == pa.binary() instead of opts.binary_type == pa.binary_view(). This should go back to the previous behavior unless, from what I understand, the files are stored with an Arrow Schema that says those are string view.
@pitrou is the above correct about the new binary_type option also driving the string behavior (not only binary columns)?
This is accurate indeed. But in this case, the Arrow schema was stored (otherwise the columns would not be read as string_view in the first place).
The real solution would be to provide Kernels though.
I can confirm that setting opts.binary_type has no effect. I don't quite know how to identify how the schema is provided, but it's the same data files that work with 20.0.0, but fail on later versions.
I guess I'll have to stay on that version, and just wait for the kernels. Tried to have a look at the code, but I suspect I would make more of a mess than a help trying to write it. It's been a while since I did much C++ templates. 😺
Activity
[-]Basic compute/comparison kernels missing for string_view?[/-][+][Python][C++] Basic compute/comparison kernels missing for string_view?[/+]raulcd commentedon Feb 23, 2026
Hi @haraldnh just to understand a little bit better. Could you share the pyarrow wheel that you are using? As far as I understand this should work but it is true that on Arrow 20.0.0 we split the compute library into its own shared library and this errors feels like the function registry hasn't registered the kernels properly. This should be automatic with PyArrow wheels provided but it is worth investigating whether there is an issue.
Is this only happening with PyArrow 20.0.0, what system? How are you installing PyArrow, could you share some details about the snippet you are using?
raulcd commentedon Feb 23, 2026
Sorry now that I take a closer look at the error it does not seem to be related at all. I am still interested on seeing a minimal reproducer to validate whether this is a regression. If we find something that used to work and now it doesn't work I can bisect to the exact cause.
haraldnh commentedon Feb 23, 2026
It's also the other way around: It works up until 20.0.0, which is where the fields are 'string'. From 21.0.0 and onwards, things are 'string_view' and I have not been able to make things work.
I'm reading a deltalake, partitioned on a 'date' (formatted like "2026-02-23") and 'time' (formatted "12:30") fields. I then produce a partition-filter like:
Then feed this through dataset = deltalake.to_pyarrow_dataset(pfilter), and then data = dataset.to_table(columns). From the error, it seems to be the partition-filter comparison that crashes, but it only fails in to_table().
raulcd commentedon Feb 23, 2026
oh! I understand now! Columns that were read from Parquet as "strings" are now read as "string_view" and there are no kernels for those. Got it. This is probably due to:
Do you manage how those Parquet files are read or is deltalake managing it?
There's a new option
binary_typewhich should drive this behavior. Usingopts.binary_type == pa.binary()instead ofopts.binary_type == pa.binary_view(). This should go back to the previous behavior unless, from what I understand, the files are stored with an Arrow Schema that says those arestring view.@pitrou is the above correct about the new
binary_typeoption also driving the string behavior (not only binary columns)?The real solution would be to provide Kernels though.
pitrou commentedon Feb 23, 2026
This is accurate indeed. But in this case, the Arrow schema was stored (otherwise the columns would not be read as string_view in the first place).
Right.
haraldnh commentedon Feb 23, 2026
I can confirm that setting opts.binary_type has no effect. I don't quite know how to identify how the schema is provided, but it's the same data files that work with 20.0.0, but fail on later versions.
I guess I'll have to stay on that version, and just wait for the kernels. Tried to have a look at the code, but I suspect I would make more of a mess than a help trying to write it. It's been a while since I did much C++ templates. 😺
pitrou commentedon Feb 24, 2026
Some issues had actually already been opened for this, so I'm closing this one: see #46856, #39634