puppetdb icon indicating copy to clipboard operation
puppetdb copied to clipboard

(PDB-5278) Fix group by dotted fact path with forward slash

Open austb opened this issue 4 years ago • 2 comments

When grouping by a keyword, honeysql will convert the keyword to SQL by calling name on it. But that will not return the entire fact name when there's a forward slash in it because Clojure interprets everything before the forward slash as the "namespace" and everything after as the "name".

=> (name :facts.foo)
"facts.foo"
=> (name :facts.f/oo)
"oo"
=> (namespace :facts.f/oo)
"facts.f"

This commit changes the query engine to use sql raw instead of the keyword to avoid splitting on forward slashes.

austb avatar Sep 17 '21 18:09 austb

I had a look over this PR and tested on PDB-5262 and that case is also resolved.

sebastian-miclea avatar Oct 01 '21 11:10 sebastian-miclea

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Apr 19 '23 21:04 CLAassistant