Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-15341

Table API refactoring.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0-alpha3
    • 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

          Activity

            People

              amashenkov Andrey Mashenkov
              amashenkov Andrey Mashenkov
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m