[#9025] failed to parse query when registering query for Percolator API

This is a PR regarding #9025 <br>
Please review this and merge it to the master<br>