Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DDL SQL expressions #55

Merged
merged 11 commits into from
Oct 10, 2020
Merged

DDL SQL expressions #55

merged 11 commits into from
Oct 10, 2020

Conversation

nils-braun
Copy link
Collaborator

@nils-braun nils-braun commented Oct 9, 2020

This PR introduces four new SQL expressions, which are added to the Apache Calcite parser and also understood by dask-sql.
They are:

-- show all schemas (currently only "schema")
SHOW SCHEMAS

-- show all registered tables
SHOW TABLES FROM "schema"

-- show all columns and column types for a table
SHOW COLUMNS FROM "table"

-- create a new dask dataframe and register it directly at the context
-- by calling one of the dd.read_* functions
-- with the given additional parameters.
CREATE TABLE "df" WITH (
  location = '/some/path',
  format = 'csv',
  ...
)
  • Currently I needed to copy all "reservedKeywords" into the parser config. I guess there should be a better way to do this, but I will need to find out how. -> Fixed by bumping the calcite dependency version to 1.26 (where exactly this is implemented with a default file)

@nils-braun nils-braun changed the title [WIP] DDL SQL expressions DDL SQL expressions Oct 9, 2020
@codecov-io
Copy link

codecov-io commented Oct 9, 2020

Codecov Report

Merging #55 into main will increase coverage by 0.10%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##             main       #55      +/-   ##
===========================================
+ Coverage   99.89%   100.00%   +0.10%     
===========================================
  Files          24        29       +5     
  Lines         992      1091      +99     
  Branches      142       153      +11     
===========================================
+ Hits          991      1091     +100     
+ Misses          1         0       -1     
Impacted Files Coverage Δ
dask_sql/mappings.py 100.00% <ø> (ø)
dask_sql/context.py 100.00% <100.00%> (+1.06%) ⬆️
dask_sql/physical/rel/custom/__init__.py 100.00% <100.00%> (ø)
dask_sql/physical/rel/custom/columns.py 100.00% <100.00%> (ø)
dask_sql/physical/rel/custom/create.py 100.00% <100.00%> (ø)
dask_sql/physical/rel/custom/schemas.py 100.00% <100.00%> (ø)
dask_sql/physical/rel/custom/tables.py 100.00% <100.00%> (ø)
dask_sql/physical/rel/logical/project.py 100.00% <100.00%> (ø)
dask_sql/physical/rel/logical/table_scan.py 100.00% <100.00%> (ø)
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 36829b8...71ba788. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants