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

Live Schema. Add Tuple validation.

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Won't Do
    • None
    • None
    • None
    • Docs Required, Release Notes Required

    Description

      Motivation.

      At a point of Table public method is called by a user, we need to validate user input (for LIVE-schema purposes at least).

      Description.

      We can add this logic to check if value fields match the current schema version (no new fields).

      • For LIVE-Schema. If Tuple has one or more additional columns, then we should try to register a new schema first, then proceed with the user operation.
      • For STRICT-Schema.  If Tuple has one or more additional columns, then we should fail the user operation.
      • For KeyValueView, we should validate key Tuple as well, and fail if there are unknown columns. Because a key column span is immutable. The only exception may be if a user creates a schemaless table, then a schema of the 1-st version should be registered instantly.

      Assumed, any column type mismatch or missed Non-Nullable columns will be caught and processed by RowAssembler.

      Possible optimization.

      It is possible to add the validation into a TupleBuilder and then just check the Tuple instance class (should be a builder).
      For any Tuple of unknown type or if a schema was changed concurrently (TupleBuilder validated input against outdated schema version), then fallback to default logic and re-validate input against the latest schema.

       

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 48h
                48h
                Remaining:
                Remaining Estimate - 48h
                48h
                Logged:
                Time Spent - Not Specified
                Not Specified

                Slack

                  Issue deployment