Is your feature request related to a problem or challenge? Please describe what you are trying to do.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
(This section helps Arrow developers understand the context and why for this feature, in addition to the what)
Right now there is limited schema and catalog support in sql. You have to be using language bindings and register the catalog / schema to the ExecutionContext before being able to select. I would like to be able to create schemas and catalogs from sql, without language bindings, so that its easier to manage ddl and do data analysis just using datafusion-cli.
DataFusion CLI v7.0.0
❯ CREATE TABLE sch.tbl AS VALUES (1,2,3);
0 rows in set. Query took 0.032 seconds.
❯ show tables;
+---------------+--------------------+------------+------------+
| table_catalog | table_schema | table_name | table_type |
+---------------+--------------------+------------+------------+
| datafusion | public | sch.tbl | BASE TABLE |
| datafusion | information_schema | tables | VIEW |
| datafusion | information_schema | columns | VIEW |
+---------------+--------------------+------------+------------+
3 rows in set. Query took 0.015 seconds.
❯ CREATE TABLE cat.sch.tbl AS VALUES (1,2,3);
0 rows in set. Query took 0.003 seconds.
❯ show tables;
+---------------+--------------------+-------------+------------+
| table_catalog | table_schema | table_name | table_type |
+---------------+--------------------+-------------+------------+
| datafusion | public | cat.sch.tbl | BASE TABLE |
| datafusion | public | sch.tbl | BASE TABLE |
| datafusion | information_schema | tables | VIEW |
| datafusion | information_schema | columns | VIEW |
+---------------+--------------------+-------------+------------+
4 rows in set. Query took 0.006 seconds.
❯ CREATE SCHEMA abc;
NotImplemented("Unsupported SQL statement: CreateSchema { schema_name: ObjectName([Ident { value: \"abc\", quote_style: None }]), if_not_exists: false }")
CREATE CATALOG xyz; 🤔 Invalid statement: sql parser error: Expected an object type after CREATE, found: CATALOG
Describe the solution you'd like
A clear and concise description of what you want to happen.
Support the following sql statements:
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Postgres reference here
https://www.postgresql.org/docs/9.3/sql-createschema.html
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
(This section helps Arrow developers understand the context and why for this feature, in addition to the what)
Right now there is limited schema and catalog support in sql. You have to be using language bindings and register the catalog / schema to the
ExecutionContextbefore being able to select. I would like to be able to create schemas and catalogs from sql, without language bindings, so that its easier to manage ddl and do data analysis just using datafusion-cli.Describe the solution you'd like
A clear and concise description of what you want to happen.
Support the following sql statements:
CREATE CATALOG abcCREATE SCHEMA xyzParse catalog and schema from
CREATE TABLE abc.xyz.tblinstead of creating table `Create Schema support
Create Catalog / Database support
/ccommand on datafusion cli to set active db / catalogDescribe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Postgres reference here
https://www.postgresql.org/docs/9.3/sql-createschema.html