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

[BP to 7.1.1] - LEFT JOIN breaks with between operator on non-existing attribute

    XMLWordPrintable

Details

    • Untriaged
    • 1
    • Unknown

    Description

      Steps to reproduce:

      a.  Create bucket customer, scope s1, and collections c1 and c2.

      b.  Add this doc in c1 and c2:

      {"id": 1}

      c.  create these indexes:

       

      CREATE PRIMARY INDEX ON `customer`.`s1`.`c1`;
      CREATE INDEX `idx1` ON `customer`.`s1`.`c2`(`id`);
      

       

      d.  run this query:

      SELECT lhs.id
      FROM customer.s1.c1 lhs
      LEFT JOIN customer.s1.c2 rhs 
      ON lhs.id = rhs.id
          AND rhs.x between 1 and 10

      No documents are output.

      e.  run this query:

      SELECT lhs.id
      FROM customer.s1.c1 lhs
      LEFT JOIN customer.s1.c2 rhs 
      ON lhs.id = rhs.id
          AND rhs.x >= 1 and rhs.x <= 10

      Now I get 1 doc.  

      Attachments

        Issue Links

          Activity

            People

              pierre.regazzoni Pierre Regazzoni
              bingjie.miao Bingjie Miao
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                PagerDuty