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

Docs: Update SQL status page #6736

Merged
merged 5 commits into from
Jun 23, 2023
Merged

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Jun 21, 2023

Which issue does this PR close?

re #3058

Rationale for this change

Someone internally at InfluxData was referring to the SQL status page in DataFusion and since it was out of date it was confusing

While updating this page it turns out DataFusion has quite a lot of features now :bowtie:

What changes are included in this PR?

Update the SQL status page -- I also removed several lists of functions that had their own documentation page rather than trying to keep two lists up to date

Here is an example of the new page rendered:
Screenshot 2023-06-21 at 11 36 16 AM

Are these changes tested?

N/A

Are there any user-facing changes?

Better docs

@alamb alamb force-pushed the alamb/window_functions_in_doc branch from dbba77a to 0048678 Compare June 21, 2023 15:42

## Runtime

- [x] Streaming Grouping
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if there are other features to highlight in the RUNTIME

Copy link
Member

@jackwener jackwener left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! @alamb

- [x] `SHOW CREATE TABLE <view>`
- [x] Basic SQL [Information Schema](./information_schema.md) (`TABLES`, `VIEWS`, `COLUMNS`)
- [ ] Full SQL [Information Schema](./information_schema.md) support
- [x] Support for nested types (`ARRAY`/`LIST` and `STRUCT`)- see [Array Functions](./scalar_functions.md#array-functions)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure whether DF have fully supported it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you are right that the support is only partial - I'll see if I can find some way to make this clearer

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this better reflects the current status:

Screenshot 2023-06-23 at 12 04 47 PM

Copy link
Contributor

@ozankabak ozankabak Jun 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think good JSON support is very important for Datafusion to get more traction in the general community. SQL2023 has some good stuff about this (see here for a good summary.).

While we are on the SQL support/ease-of-use topic, this DuckDB page is also a good list of desiderata for us (some of these we implemented already).

I plan to actively talk about/promote Datafusion in various venues once we get into a state where these things "just work".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think good JSON support is very important for Datafusion to get more traction in the general community. SQL2023 has some good stuff about this (see here for a good summary.).

I agree.

While we are on the SQL support/ease-of-use topic, this DuckDB page is also a good list of desiderata for us (some of these we implemented already).

It would be great to file tickets about these features -- I have found clearly written tickets with a "good first issue" often attracts contributions. If you have a chance to file the tickets that would be awesome, otherwise I will try and find time to do so

I plan to actively talk about/promote Datafusion in various venues once we get into a state where these things "just work".

I think it is a balance -- part of the way we grow the DataFusion community (to get the resources to make it better) is to talk about it publically.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will file tickets for these 👍

- [x] Write support
- [x] Field access (`col['field']` and [`col[1]`])
- [x] [Array Functions](./scalar_functions.md#array-functions)
- [ ] [Struct Functions](./scalar_functions.md#struct-functions)
Copy link
Contributor Author

@alamb alamb Jun 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This link will work after #6754 is merged

- [x] Schemas (`CREATE / DROP SCHEMA`)
- [x] Tables (`CREATE / DROP TABLE`, `CREATE TABLE AS SELECT`)
- [ ] Data Insert
- [x] `INSERT INTO`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @alamb that is not very clear to me.
Do you mean DF supports SQL syntax to insert data into CSV file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that is correct Here is an example:

(arrow_dev) alamb@MacBook-Pro-8:~/Software/arrow-site$ touch /tmp/foo.csv
(arrow_dev) alamb@MacBook-Pro-8:~/Software/arrow-site$ datafusion-cli
DataFusion CLI v26.0.0
❯ create external table foo (x int) stored as csv location '/tmp/foo.csv';
0 rows in set. Query took 0.004 seconds.
❯ insert into foo values (1), (2), (3);
+-------+
| count |
+-------+
| 3     |
+-------+
1 row in set. Query took 0.005 seconds.
❯
\q
(arrow_dev) alamb@MacBook-Pro-8:~/Software/arrow-site$ cat /tmp/foo.csv
1
2
3

The UX is somewhat awkward at the moment as it can only append into existing files (not create new ones). I have real hopes it will be improved

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh that is really cool, I want to make this happen for parquet asap. Will create a ticket and implement it. Should be straightfwd as we have parquetwriter

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️ -- I also think #5654 is very related (rather than having to define the table in order to add to it). See #6539 where I started the basics

@alamb alamb merged commit 80d1750 into apache:main Jun 23, 2023
@alamb alamb deleted the alamb/window_functions_in_doc branch June 24, 2023 10:22
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.

4 participants