[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:
Duplicate
is duplicated by PDB-2862 PQL 'in' modifier doesn't work as adv... Closed
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.



 Comments   
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 Wed Aug 21 01:13:35 PDT 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.