Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
Docs Required, Release Notes Required
Description
1. `IgniteTables.getOrCreateTable` method accepts table configuration as an argument.
However, it is not clear if there is a guarantee the returned table will have the configuration equals to the provided one.
Actually, the method creates a table if it does not exist, otherwise returns existed table instance.
Let's rename it to `createTableIfNotExists` to be consistent with the current behavior.
2. SchemaTable class name looks incorrect.
Let's rename it to TableDefinition and rename other schema classes to make them consistent with the "Definition" suffix.
3. PrimaryIndex is not an index in SQL standard. Actually, it is a constraint, and the index on primary columns is optional.
In the general case, a primary index must not be sorted-index and can be e.g. hash-index. We already have a mandatory hash-index on primary columns.
Let's remove PK from indices and introduce PK constraint. Thus, a user must create a sorted index manually if needed.
Maybe later, we will add a shortcut or some property in the configuration for automatic index creation.
Attachments
Issue Links
- blocks
-
IGNITE-15556 Drop SchemaBuilder API.
- Resolved
- links to