Repository navigation
dialect(oracle, clickhouse): createSchema and dropSchema, tested in Docker - #104
Merged
Merged
Conversation
…ocker
Both wrote CREATE SCHEMA and DROP SCHEMA, which neither server runs in
any version checked.
OracleDialect (XE 18, 21, Free 23.9, 23.26.4):
- a schema is a user: CREATE SCHEMA is Oracle's CREATE SCHEMA
AUTHORIZATION, objects for a user there already (ORA-02420), and
DROP SCHEMA no statement (ORA-00950)
- createSchema: CREATE USER [IF NOT EXISTS] "s" NO AUTHENTICATION
QUOTA UNLIMITED ON USERS; without the quota a table of the schema
takes no row (ORA-01950); USERS must be there, as in XE and Free
- dropSchema: DROP USER [IF EXISTS] "s" CASCADE, always CASCADE, for
Oracle drops no user of objects without it (ORA-01922)
- IF [NOT] EXISTS from 23, left out before and for no version, as for
users; supportsDropSchemaIfExists from 23
- supportsSchemas as supportsUsers, from 18: 11 has no NO
AUTHENTICATION, createSchema and dropSchema give null there
ClickHouseDialect (21.3 to 26.6):
- a schema is a database: CREATE SCHEMA and DROP SCHEMA are syntax
errors (Code 62) in every version
- createSchema: CREATE DATABASE [IF NOT EXISTS] "s"
- dropSchema: DROP DATABASE [IF EXISTS] "s", which drops its tables;
no CASCADE, which ClickHouse has not
Container tests, the dialect built from a live connection:
- OracleSchemaTest: the schema a user authenticated by nothing, a
table of it takes rows, a second create fails with ORA-01920, the
drop takes the table along; IF [NOT] EXISTS from 23, ORA-01918 for
a missing one before
- ClickHouseSchemaTest: the schema a database, a table of it takes
rows, IF NOT EXISTS twice, the drop takes the table along, without
IF [NOT] EXISTS a second create and a second drop fail
Signed-off-by: <bulahovdenis@gmail.com>
stbischof
approved these changes
Nov 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Both wrote CREATE SCHEMA and DROP SCHEMA, which neither server runs in
any version checked.
OracleDialect (XE 18, 21, Free 23.9, 23.26.4):
ClickHouseDialect (21.3 to 26.6):
Container tests, the dialect built from a live connection: