Compare results fails between query result and quick evaluation
rvermeulen opened this issue · comments
Describe the bug
When running a query and a quick-eval on a testproj, comparing the results using the compare results
action fails with the error
Failed to show results: Schema undefined not found.
Version
CodeQL extension version: 1.8.2
CodeQL CLI version: 2.12.6
Platform: Darwin x64
VS Code Version: 1.77.2 (Universal)
VS Code Commit: e344f1f539a80912a0e9357cec841f36ce97a4e2
To reproduce
- Create a testproj database from a failing test case.
- Use the testproj database to run a query.
- Quick eval part of the query that is compliant for comparing using the
compare results
command. - See the error message.
Expected behavior
Expected to see a result difference.
Additional context
Getting a chance to look at this now. The problem is that the compare view chooses the first common result set that is shared between both queries to display, but quick eval creates a custom named result set, so there is no common result set.
Two things to do:
- Provide better error message if a matching result set can't be found.
- Use better matching heuristics for result sets. First try to match on exact name (as now) and then try to match on the first
#
-prefixed result set in each query.
Fixed by #2422
Will be available in next release of the extension.