Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-45909

[CX] Differentiation between parser name and display name

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 7.0.0
    • Cheshire-Cat
    • UI
    • Untriaged
    • 1
    • Unknown

    Description

      As briefly (and too vaguely) mentioned in MB-45701, we need to differentiate between a display form and a parser form of an entity name to have adequate forms for different contexts.

      The display form should be used in the analytics workbench to display names for human consumption (in confirmation dialogs, drop warnings, the side bar, the alerts at the bottom left of the screen etc.) - they are easy to read and aligned with the representation on the query console.

      The parser form needs be used when generating DDL (or DML) statements the are generated by the workbench and that are evaluated by the query processor.

      Both display form and parser form can easily be generated from the canonical form that is available in the metadata collections. The canonical form in the metadata consists of 2 parts that are required for backwards compatibility: a DataverseName and a DatasetName.
      The DataverseName contains the equivalent of a bucket name and a scope name on the KV side (separated by a slash (/)).
      The DatasetName contains the equivalent of a collection name.

      Here's an example how the display form and the parser form for a DataverseName are derived from the canonical form if the canonical for contains a slash (/)

      canonical form (in metadata) bu-ck.et/scope
      display form (for humans) bu-ck.et.scope
      parser form (for queries) `bu-ck.et`.`scope`

      and if it does not contain a slash (/)

      canonical form (in metadata) data-verse
      display form (for humans) data-verse
      parser form (for queries) `data-verse`

      When composing an entity (e.g. collection) identifier from the DatasetName and DataverseName the display from should be composed using plain english. The parser from should follow the same rules as the parser form for a  DataverseName.
      For example when combining the DataverseName bu-ck.et/scope and the DatasetName some-enti.ty the forms are

      display form (for humans) analytics collection some-enti.ty in scope bu-ck.et.scope
      parser form (for queries) `bu-ck.et`.`scope`.`some-enti.ty`

      Attachments

        Issue Links

          For Gerrit Dashboard: MB-45909
          # Subject Branch Project Status CR V

          Activity

            People

              umang.agrawal Umang
              till Till Westmann
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty