Skip to content

Registered views with FFI schema providers cannot be executed #1444

@timsaucer

Description

@timsaucer

Describe the bug

When you have a FFI based schema provider and you register a view with it, it is unable to be executed. This is a regression from 51.0.0 to 52.3.0.

To Reproduce

Add this test to examples/datafusion-ffi-example/python/tests/_test_schema_provider.py

def test_table_provider_view():
    ctx = SessionContext()

    schema_provider = FixedSchemaProvider()
    ctx.catalog().register_schema("ffi_schema", schema_provider)

    df = ctx.read_table(create_test_dataset())

    ctx.register_view("ffi_schema.my_view", df)

    ctx.sql("SELECT * from ffi_schema.my_view").show()

Expected behavior

We should be able to read views like this.

Additional context

The error generated is:

E       Exception: DataFusion error: FFI error: FFI error: Error serializing custom table at /Users/tsaucer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/datafusion-proto-53.0.0/src/logical_plan/mod.rs:1194
E       caused by
E       This feature is not implemented: LogicalExtensionCodec is not provided

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions