-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
LogicalExtensionCodec
allows providing a custom serialization strategy for a TableProvider
, but the calling code always expects a DefaultTableSource
to unwrap:
let provider = source_as_provider(source)?; |
Which calls source_as_provider
:
datafusion/datafusion/catalog/src/default_table_source.rs
Lines 99 to 110 in 8d7b11b
pub fn source_as_provider( | |
source: &Arc<dyn TableSource>, | |
) -> datafusion_common::Result<Arc<dyn TableProvider>> { | |
match source | |
.as_ref() | |
.as_any() | |
.downcast_ref::<DefaultTableSource>() | |
{ | |
Some(source) => Ok(Arc::clone(&source.table_provider)), | |
_ => internal_err!("TableSource was not DefaultTableSource"), | |
} | |
} |
It would be better if LogicalExtensionCodec
had encode_table_source
instead of encode_table_provider
.
To Reproduce
No response
Expected behavior
No response
Additional context
No response
OlegWock
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working