Skip to content

Quick-eval results cannot be compared #873

Open
@adityasharad

Description

@adityasharad

Describe the bug

When running the Compare Results command from the Query History view on the results of Quick Evaluation queries, the comparison view is empty, with no table names in the dropdown. If two different predicates were run, this also throws an error Schema undefined not found..

Version
CodeQL extension version: 1.4.8
CodeQL CLI version: 2.5.5

To reproduce

  • Create a query file with two predicates.
    int i1() { result = 1 }
    int i2() { result = 2 }
    select 1
  • Quick-evaluate i1 twice. Select the two runs in Query History, right click, Compare Results.
    • This produces an empty compare view with no table names in the dropdown.
  • Quick-evaluate i1 then i2. Select the two runs in Query History, right click, Compare Results.
    • This fails with an error Schema undefined not found.
    • It also produces the same empty compare view with no table names in the dropdown.

Expected behavior

  • When the predicate name and columns match, show the quick-eval predicate name in the dropdown, and show a comparison of results.
  • If the predicate names do not match, but the two schemas are compatible, attempt to compare the results, with a placeholder table name in the dropdown.
  • If the schemas aren't compatible, show an empty comparison with a suitable warning message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    VSCodebugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions