Skip to content

Switch SQL Editor to Query Builder on Explore view not working at the version >= 4.5.0 #1080

Open
@nonylene

Description

@nonylene

What happened:

We cannot switch SQL Editor to Query Builder on Explore view when the query is not compatible with Query Builder, after upgrading the plugin to 4.5.0 / 4.5.1.

What you expected to happen:

We can switch back to Query Builder from SQL Editor as before.

How to reproduce it (as minimally and precisely as possible):

  1. Install clickhouse plugin above 4.5.0 and set up clickhouse datasource
  2. Go to Explore view and select the clickhouse as datasource
  3. Switch SQL Editor on Editor Type

Image

  1. Click Query Builder on Editor Type and click Continue on the modal
    Image

  2. We cannot go back to Query Builder even after clicking "Continue"

Below error is shown in the console on every click

utils.ts:90 Uncaught (in promise) Error: The query is not a select statement.
    at ns (utils.ts:90:11)
    at $ (EditorTypeSwitcher.tsx:51:28)
    at h (EditorTypeSwitcher.tsx:78:5)
    at B (ConfirmContent.tsx:84:13)
    at index.esm.mjs:2271:23

Screenshots

Image

The first syntax error should be expected, which is thrown on 4.4.0 too.

Anything else we need to know?:

On 4.4.0, we can switch back to Query Builder after clicking "Continue".

Environment:

  • Grafana version: Grafana v11.3.1 (64b556c137)
  • Plugin version: 4.5.1
  • OS Grafana is installed on: Kubernetes (Grafana helm chart)
  • User OS & Browser: Windows 11 / Chrome Version 131.0.6778.86 (Official Build) (64-bit)
  • Others:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Incoming

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions