MCPcopy Create free account
hub / github.com/apache/datafusion / register_arrow

Method register_arrow

datafusion/core/src/execution/context/mod.rs:1864–1881  ·  view source on GitHub ↗

Registers an Arrow file as a table that can be referenced from SQL statements executed against this context.

(
        &self,
        table_ref: impl Into<TableReference>,
        table_path: impl AsRef<str>,
        options: ArrowReadOptions<'_>,
    )

Source from the content-addressed store, hash-verified

1862 /// Registers an Arrow file as a table that can be referenced from
1863 /// SQL statements executed against this context.
1864 pub async fn register_arrow(
1865 &self,
1866 table_ref: impl Into<TableReference>,
1867 table_path: impl AsRef<str>,
1868 options: ArrowReadOptions<'_>,
1869 ) -> Result<()> {
1870 let listing_options = options
1871 .to_listing_options(&self.copied_config(), self.copied_table_options());
1872 self.register_listing_table(
1873 table_ref,
1874 table_path,
1875 listing_options,
1876 options.schema.map(|s| Arc::new(s.to_owned())),
1877 None,
1878 )
1879 .await?;
1880 Ok(())
1881 }
1882
1883 /// Registers a named catalog using a custom `CatalogProvider` so that
1884 /// it can be referenced from SQL statements executed against this

Calls 6

newFunction · 0.85
to_listing_optionsMethod · 0.80
copied_configMethod · 0.80
copied_table_optionsMethod · 0.80
mapMethod · 0.45