Prefer #select result set over other result sets#2395
Conversation
For `@kind problem` queries, it seems like the BQRS contains four result sets: `edges`, `nodes`, `subpaths`, and `#select`. The user is probably interested in the results of `#select` since that contains the direct result of the query. This changes the extraction of raw (BQRS) results to always prefer `#select` over any other result set. If it can't find a result set named `#select`, it will fall back to the first result set in the BQRS like before.
charisk
left a comment
There was a problem hiding this comment.
Seems reasonable to me! Thanks for fixing.
|
This makes sense, however, would it be possible to change the compiler to ensure that "main" result is always the first? For example for |
Is there a CodeQL CLI command to retrieve the main result set? There is a function in the extension codebase that returns the "default" result set name, but this is a static list of |
For
@kind problemqueries, it seems like the BQRS contains four result sets:edges,nodes,subpaths, and#select. The user is probably interested in the results of#selectsince that contains the direct result of the query. This changes the extraction of raw (BQRS) results to always prefer#selectover any other result set. If it can't find a result set named#select, it will fall back to the first result set in the BQRS like before.Checklist
ready-for-doc-reviewlabel there.