What happens?
I can't seem to compare a string_view Arrow column (via the pyarrow Dataset API) to a literal. Is there anyway to force the literal to be a string_view instead of a string?
I originally reported this in duckdb/duckdb#19861 and was instructed to refile here.
To Reproduce
Install the latest versions of: duckdb, vortex-data, and typing-extensions (due to a missing dependency in vortex).
uv add duckdb vortex-data typing-extensions
Python code:
import vortex as vx
import duckdb
vx.io.write(vx.array([{"column": "a string"}]), 'foo.vortex')
x = vx.open('foo.vortex').to_dataset()
duckdb.execute("select * from x where \"column\" == 'hello world'").to_arrow_table()
Python output:
Traceback (most recent call last):
File "<python-input-0>", line 5, in <module>
duckdb.execute("select * from x where \"column\" == 'hello world'").to_arrow_table()
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_duckdb.Error: ArrowNotImplementedError: Function 'equal' has no kernel matching input types (string_view, string)
At:
pyarrow/error.pxi(92): pyarrow.lib.check_status
I can't replicate with the DuckDB CLI. Whatever path that takes must avoid a string_view?
install vortex; load vortex; select * from read_vortex('foo.vortex') where "column" == 'hello world';
┌─────────┐
│ column │
│ varchar │
├─────────┤
│ 0 rows │
└─────────┘
The full transcript of what I did:
# mkdir bar
# cd bar
# uv init
Initialized project `bar`
# uv add duckdb vortex-data typing-extensions
Using CPython 3.14.0
Creating virtual environment at: .venv
Resolved 7 packages in 58ms
Installed 6 packages in 15ms
+ duckdb==1.4.2
+ protobuf==5.29.5
+ pyarrow==22.0.0
+ substrait==0.25.0
+ typing-extensions==4.15.0
+ vortex-data==0.56.0
# uv run python
Python 3.14.0 (main, Oct 31 2025, 23:20:55) [Clang 21.1.4 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import vortex as vx
... import duckdb
... vx.io.write(vx.array([{"column": "a string"}]), 'foo.vortex')
... x = vx.open('foo.vortex').to_dataset()
... duckdb.execute("select * from x where \"column\" == 'hello world'").to_arrow_table()
...
Traceback (most recent call last):
File "<python-input-0>", line 5, in <module>
duckdb.execute("select * from x where \"column\" == 'hello world'").to_arrow_table()
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_duckdb.Error: ArrowNotImplementedError: Function 'equal' has no kernel matching input types (string_view, string)
At:
pyarrow/error.pxi(92): pyarrow.lib.check_status
>>>
OS:
macOS
DuckDB Package Version:
1.4.2
Python Version:
1.4.2
Full Name:
Daniel King
Affiliation:
SpiralDB, Inc.
What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.
I have tested with a stable release
Did you include all relevant data sets for reproducing the issue?
Yes
Did you include all code required to reproduce the issue?
Did you include all relevant configuration to reproduce the issue?
What happens?
I can't seem to compare a string_view Arrow column (via the pyarrow Dataset API) to a literal. Is there anyway to force the literal to be a string_view instead of a string?
I originally reported this in duckdb/duckdb#19861 and was instructed to refile here.
To Reproduce
Install the latest versions of:
duckdb,vortex-data, andtyping-extensions(due to a missing dependency in vortex).Python code:
Python output:
I can't replicate with the DuckDB CLI. Whatever path that takes must avoid a string_view?
The full transcript of what I did:
OS:
macOS
DuckDB Package Version:
1.4.2
Python Version:
1.4.2
Full Name:
Daniel King
Affiliation:
SpiralDB, Inc.
What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.
I have tested with a stable release
Did you include all relevant data sets for reproducing the issue?
Yes
Did you include all code required to reproduce the issue?
Did you include all relevant configuration to reproduce the issue?