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

INSERT statements without target column list are not working #5078

Closed
gruuya opened this issue Jan 26, 2023 · 0 comments · Fixed by #5079
Closed

INSERT statements without target column list are not working #5078

gruuya opened this issue Jan 26, 2023 · 0 comments · Fixed by #5079
Labels
bug Something isn't working

Comments

@gruuya
Copy link
Contributor

gruuya commented Jan 26, 2023

Describe the bug
Planning of INSERT statements does not allow for omitting target column list in the SQL statement.

To Reproduce

❯ create table test as values (1, 2);
0 rows in set. Query took 0.149 seconds.
❯ insert into test values (3, 4);
Plan("Column count doesn't match insert query!")
❯ insert into test(column1, column2) values (3, 4);
Internal("Unsupported logical plan: Dml")

The first error should be the same as the second, which comes from the stubbed out physical planning implementation.

Expected behavior
It is generally accepted that the target column list is optional, and if omitted the target is assumed to be all the columns in the schema.

Additional context
Related to the new LogicalPlan::Dml node for WriteOp::Insert (handled in insert_to_plan).

@gruuya gruuya added the bug Something isn't working label Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant