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

Use previously defined LET variables in RHS of a LET variable definition

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Duplicate
    • Major
    • 6.5.0
    • 4.0.0
    • query
    • Security Level: Public
    • None

    Description

      From trevorm@simba.com: "I found that any LET alias that references another will always return MISSING. This is not a high priority for me as I no longer have a use-case that requires it."

      We should at least emphasize that it is not supported; the following query will correctly return 0 but the result could be potentially confusing if there is an expectation that previous LET variables can be used in a definition:

      SELECT count(beer) 
      FROM `beer-sample` beer
      LET  min_abv = 5, 
           strong_abv = beer.abv > min_abv * 2
      WHERE type = "beer" AND strong_abv
      

      Attachments

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

        Activity

          People

            marco.greco Marco Greco (Inactive)
            colm Colm Mchugh (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty