-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
create mem table should not override current tables #1269
Comments
FYI @Dandandan |
Yes agree @jimexist . |
I think this would be a good first issue for someone who wanted to tackle it |
I think this is a bug for management of table metadata. |
I'd be happy to give this a shot, but would need to understand the desired behaviour a bit better. i.e. should an error be returned only if the table is registered via the context, or should this be pushed down to the catalogue/schema level? |
Yes, I agree, I tested in pg.
|
isn't that just about name conflict? no matter if the new schema is compatible or conflict with the existing one it shall not be allowed |
Yes. |
we should forbid this in the SQL parse phase. |
I suggest we support the postgres model here (it does not seem to have create table foo (...); -- errors if a table named foo already exists drop table foo (...); -- errors if the table does not already exists That way it is super clear that we aren't replacing tables and the user has to explicitly drop the existing one Bonus points for supporting |
Here is what postgres does:
|
I can give another pull request to implement the |
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
With #1252 dropping supported, we should not override existing table with create table as statement.
Describe the solution you'd like
current behavior:
expecting
statement to err on the second create.
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.
The text was updated successfully, but these errors were encountered: