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
Arrow Pushdowns fail when *any* column is a string_view #227
That PR doesn't fix this issue. This issue was tested after that was merged.
That PR handles cases where the expression compares a string_view column.
This issue occurs when any column is a string_view.
Example:
importpolarsasplimportduckdbprint(duckdb.__version__)
df=pl.DataFrame({"sv_col": ["abc"], "int_col": [1]})
arrow_table=df.to_arrow(compat_level=pl.CompatLevel.newest())
# Passes, because of duckdb/duckdb#20165duckdb.execute("select * from arrow_table where sv_col = 'abc'").df()
# Still failsduckdb.execute("select * from arrow_table where int_col = 1").df()
In other words, duckdb makes the false assumption that all Arrow datasets support the same predicates / comparisons for pushdown.
Possible Solutions
duckdb should be pessimistic, and deny pushdown when any backend doesn't support a particular predicate on a particular datatype
duckdb should be optimistic, attempting to pushdown, but duckdb-python would gracefully handle an exception during pushdown - falling back to a no-pushdown case. Currently, duckdb-python will reraise the exception.
(too complicated) duckdb would need to add rules to handle backend specific cases, handling (for instance) vortex datasets differently.
somehow check at runtime which predicates are supported: this would involve some change in Arrow.
FWIW, after noodling on this a bit, I've come to the conclusion that the Arrow Dataset API is pretty awkward. I suppose there's a reasonable argument that Vortex (and other Dataset implementors) should just support every Arrow expression (we could always just evaluate the expression ourselves before yielding each record batch). However, that means that duckdb will push expressions down to us that might be faster/cheaper to evaluate in duckdb. It seems like, at least for Vortex, we should push folks away from the Arrow Dataset API and towards the Vortex duckdb extension.
@danking while I think I agree with your conclusion, I don't think it's related to -this- issue. This issue is arrow compute raising when array_filter is called when there's a string_view in the Arrow table.
It won't actually raise with a Vortex dataset, which makes it an opposite case where Vortex supports the pushdown where Arrow doesn't.
Just to be clear: even if users never hit the vortex dataset api, this issue still needs to be resolved for Arrow
This PR adds a config option that gates pushdown on whether the schema contains view types. I'm not sure whether this is the way to go, feedback very welcome.
Activity
paultiq commentedon Dec 15, 2025
This is an Arrow issue as shown below, but DuckDB could/should not attempt a pushdown if any column is a string_view (or perhaps any View).
apache/arrow#43010
Tishj commentedon Dec 18, 2025
This was merged upstream to fix the problem: duckdb/duckdb#20165
paultiq commentedon Dec 18, 2025
That PR doesn't fix this issue. This issue was tested after that was merged.
That PR handles cases where the expression compares a string_view column.
This issue occurs when any column is a string_view.
Example:
paultiq commentedon Dec 18, 2025
In digging into this, and the related Vortex issue, there's a messy set of problems bigger than just this issue:
Arrow backends (Vortex, Arrow Compute, etc) support different predicates, but arrow.cpp:CanPushdown assumes coverage is universal:
vortex-computecompute functions vortex-data/vortex#5781. This is a new issue that raises an exception in duckdb.In other words, duckdb makes the false assumption that all Arrow datasets support the same predicates / comparisons for pushdown.
Possible Solutions
danking commentedon Jan 8, 2026
FWIW, after noodling on this a bit, I've come to the conclusion that the Arrow Dataset API is pretty awkward. I suppose there's a reasonable argument that Vortex (and other Dataset implementors) should just support every Arrow expression (we could always just
evaluatethe expression ourselves before yielding each record batch). However, that means that duckdb will push expressions down to us that might be faster/cheaper to evaluate in duckdb. It seems like, at least for Vortex, we should push folks away from the Arrow Dataset API and towards the Vortex duckdb extension.paultiq commentedon Jan 8, 2026
@danking while I think I agree with your conclusion, I don't think it's related to -this- issue. This issue is arrow compute raising when array_filter is called when there's a string_view in the Arrow table.
It won't actually raise with a Vortex dataset, which makes it an opposite case where Vortex supports the pushdown where Arrow doesn't.
Just to be clear: even if users never hit the vortex dataset api, this issue still needs to be resolved for Arrow
evertlammerts commentedon Jan 27, 2026
This PR adds a config option that gates pushdown on whether the schema contains view types. I'm not sure whether this is the way to go, feedback very welcome.
Disable pushdown for arrow tables that contain view columns (#20703)