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

[BP to 7.1.6-MP1 & 7.2.3-MP1]Support Hash JOIN re-open

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 7.1.7
    • 7.1.5, 7.1.6
    • query
    • 0

    Description

      Hash JOIN re-open may need to support

      • Correlated subqueries
      • UDFs

      If not supported in UDF hash JOIN must disable. Otherwise wrong results. Huge performance impact too

       

       

      UPSERT INTO default (KEY k, VALUE v) SELECT "k00"||TO_STR(d) AS k, {"c1":d, "c2":d, "c3":d} AS v FROM ARRAY_RANGE(1,10) AS d;
      CREATE INDEX ix1 ON default(c1,c2, c3);
      CREATE OR REPLACE FUNCTION f10(a) {
      ( SELECT l, r
      FROM default AS l
      JOIN default AS r USE HASH (BUILD) ON l.c3=r.c3
      WHERE l.c1 > 0 AND r.c1 > 0 AND r.c2 = a)
      };
      SELECT f10(t.c1) FROM default AS t
      WHERE t.c1 > 0;
      

      I have small changes to repro this. Query gives wrong results.

       

      Attachments

        Issue Links

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

          Activity

            People

              pierre.regazzoni Pierre Regazzoni
              Sitaram.Vemulapalli Sitaram Vemulapalli
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty