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

INFER does not work on single element JSON docs

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.5.0
    • 6.5.0
    • UI
    • Untriaged
    • Unknown

    Description

      Problem

      A document with single JSON element ( raw JSON types) is valid JSON, for example a string or array or a number:

      5
      "raw string"
      ["array","of","raw","values",12345,true]
      true
      

      Unfortunately INFER doesn't handle them and produces an empty schema. 

      Steps to reproduce

      1. Insert a number of single JSON Element documents (ensure that the Data type is set correctly to JSON)
      2. Run INFER

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            Cloned this of MB-30734 and cleaned it up to related to just INFER.

            Eben Haber It would be good to check that the single JSON element document is still getting tagged as JSON as the data type by the Data service.

            pvarley Patrick Varley added a comment - Cloned this of MB-30734 and cleaned it up to related to just INFER. Eben Haber It would be good to check that the single JSON element document is still getting tagged as JSON as the data type by the Data service.

            Also set the component to UI but I suspect it should be query?

            pvarley Patrick Varley added a comment - Also set the component to UI but I suspect it should be query?
            eben Eben Haber added a comment -

            Patrick Varley - I'm the one responsible for INFER, so even though it's part of the query engine. It's fine as a "UI" issue.

            eben Eben Haber added a comment - Patrick Varley - I'm the one responsible for INFER, so even though it's part of the query engine. It's fine as a "UI" issue.

            Build couchbase-server-6.5.0-2562 contains cbq-gui commit 89e3ec5 with commit message:
            Make INFER support fields with multiple different types.

            build-team Couchbase Build Team added a comment - Build couchbase-server-6.5.0-2562 contains cbq-gui commit 89e3ec5 with commit message: Make INFER support fields with multiple different types.
            eben Eben Haber added a comment -

            I just merged a fix for this.

            eben Eben Haber added a comment - I just merged a fix for this.

            Build couchbase-server-6.5.0-2619 contains query-ui commit 1043bef with commit message:
            MB-31862 Update schema sidebar to handle top-level bare values.

            build-team Couchbase Build Team added a comment - Build couchbase-server-6.5.0-2619 contains query-ui commit 1043bef with commit message: MB-31862 Update schema sidebar to handle top-level bare values.
            eben Eben Haber added a comment -

            Wayne Siu - This is pretty minor, and is not needed for 6.0.2.

            eben Eben Haber added a comment - Wayne Siu - This is pretty minor, and is not needed for 6.0.2.

            People

              eben Eben Haber
              eben Eben Haber
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty