Uploaded image for project: 'PuppetDB'
  1. PuppetDB
  2. PDB-2330

'in' clause against a subquery doesn't work for fact-contents

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PDB 4.2.4
    • Component/s: None
    • Labels:
      None
    • Template:
    • Story Points:
      1

      Description

      POST http://localhost:8080/pdb/query/v4/fact-contents
      Content-Type: application/json

      { "query": ["in", "value", ["extract", "title", ["select_resources", ["=", "type", "Package"]]]] }

      Will generate SQL that uses the fact_values 'value' column, which contains a json literal (i.e. a quoted string). This will never match string values. The most correct thing to do here would seem to be to see from the query that resource title is a string and turn it into a query on value_string.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              russell.mull Russell Mull
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support