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

Function get_table_options

datafusion-cli/src/object_storage.rs:892–904  ·  view source on GitHub ↗

Plans the `CREATE EXTERNAL TABLE` SQL statement and returns the resulting resolved `CreateExternalTable` command.

(ctx: &SessionContext, sql: &str)

Source from the content-addressed store, hash-verified

890 /// Plans the `CREATE EXTERNAL TABLE` SQL statement and returns the
891 /// resulting resolved `CreateExternalTable` command.
892 async fn get_table_options(ctx: &SessionContext, sql: &str) -> TableOptions {
893 let mut plan = ctx.state().create_logical_plan(sql).await.unwrap();
894
895 let LogicalPlan::Ddl(DdlStatement::CreateExternalTable(cmd)) = &mut plan else {
896 panic!("plan is not a CreateExternalTable");
897 };
898
899 let mut table_options = ctx.state().default_table_options();
900 table_options
901 .alter_with_string_hash_map(&cmd.options)
902 .unwrap();
903 table_options
904 }
905
906 async fn check_aws_envs() -> Result<()> {
907 let aws_envs = [

Calls 4

create_logical_planMethod · 0.80
stateMethod · 0.45
default_table_optionsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…