[PDB-2330] 'in' clause against a subquery doesn't work for fact-contents Created: 2016/01/19  Updated: 2017/03/15  Resolved: 2016/08/31

Status: Closed
Project: PuppetDB
Component/s: None
Affects Version/s: None
Fix Version/s: PDB 4.2.4

Type: Bug Priority: Normal
Reporter: Russell Mull Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
is duplicated by PDB-2862 PQL 'in' modifier doesn't work as adv... Closed
Story Points: 1


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.

Comment by Russell Mull [ 2016/01/19 ]

Carl CaumThis is the issue you found a few weeks ago.

Comment by Wyatt Alt [ 2016/07/21 ]

blocked on PDB-2632 due to schema changes

Comment by Susan McNerney [ 2016/08/10 ]

Wyatt Alt is this still blocked?

Generated at Sun Jul 12 23:23:09 PDT 2020 using Jira 8.5.2#805002-sha1:a66f9354b9e12ac788984e5d84669c903a370049.