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
FFI schema providers fail when views are registered #21155
The reason this worked in 51.0.0 is because we created a SessionContext within the FFI providers. So when we called create_physical_plan in DataFrameTableProvider it had a localSessionContext (not the actual session context that registration was happening with) and that was able to do the appropriate downcasting to ViewTable for the table scan.
The reason this does not work in 52.3.0 is because we now have a full FFI_Session instead of creating a temporary locally held SessionContext. Thus when we have a Arc<dyn TableProvider> in the protobuf serialization code it shows up as a ForeignTableProvider and NOT a ViewTable. Thus we try the "fall back" to a logical codec which gives the user error we end up with.
Activity
timsaucer commentedon Mar 25, 2026
The reason this worked in 51.0.0 is because we created a
SessionContextwithin the FFI providers. So when we calledcreate_physical_planinDataFrameTableProviderit had a localSessionContext(not the actual session context that registration was happening with) and that was able to do the appropriate downcasting toViewTablefor the table scan.The reason this does not work in 52.3.0 is because we now have a full
FFI_Sessioninstead of creating a temporary locally heldSessionContext. Thus when we have aArc<dyn TableProvider>in the protobuf serialization code it shows up as aForeignTableProviderand NOT aViewTable. Thus we try the "fall back" to a logical codec which gives the user error we end up with.timsaucer commentedon Mar 25, 2026
This is resolved in
mainand the fix is to here: https://github.com/apache/datafusion/blob/main/datafusion/ffi/src/table_provider.rs#L394C9-L396C10Open question of if we need to backport to (another) release of 52 since 53 is already out.
Support table views on our schema provider
alamb commentedon Apr 6, 2026
I am making a new 52 so I'll also make a backport of this one (well, really have an agent do it)
alamb commentedon Apr 6, 2026
Actually, after some research I see that this is not is not a trivial backport, so I'll hold off on doing anything and leave it to to experts
[BRANCH-52] fix: foreign inner ffi types (#21439)
[BRANCH-52] fix: foreign inner ffi types (#21439)
[branch-53] fix: foreign inner ffi types (#21439) (#21524)