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

Support INSERT INTO statement #4397

Closed
Tracked by #4460
mvanschellebeeck opened this issue Nov 27, 2022 · 1 comment · Fixed by #4496
Closed
Tracked by #4460

Support INSERT INTO statement #4397

mvanschellebeeck opened this issue Nov 27, 2022 · 1 comment · Fixed by #4496
Labels
enhancement New feature or request

Comments

@mvanschellebeeck
Copy link
Contributor

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Support the INSERT INTO expression, e.g.
INSERT INTO t1(e,c,b,d,a) VALUES(103,102,100,101,104)

Executing with datafusion-cli:

DataFusion CLI v14.0.0
❯ CREATE TABLE abc AS VALUES (1,2,3), (4,5,6);
0 rows in set. Query took 0.004 seconds.
❯ SELECT * FROM abc;
+---------+---------+---------+
| column1 | column2 | column3 |
+---------+---------+---------+
| 1       | 2       | 3       |
| 4       | 5       | 6       |
+---------+---------+---------+
2 rows in set. Query took 0.005 seconds.
❯ INSERT INTO abc(column1, column2, column3) values (7,8,9);
NotImplemented("Unsupported SQL statement: Some(\"INSERT INTO abc (column1, column2, column3) VALUES (7, 8, 9)\")")

Additional context
The ability to insert values via the cli throughout a sessions forms the basis of a lot of sqllogictests we want to incorporate into testing. See #4248

@alamb
Copy link
Contributor

alamb commented Nov 29, 2022

Anything involving arrow is going to be non ideal (aka is going to be very slow) with multiple "INSERT INTO" statements.

I suggest we implement support for INSERT INTO statements (and possibly #4396) as part of the test harness rather than in DataFusion itself

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

Successfully merging a pull request may close this issue.

2 participants