Skip to content

Web console: support SET syntax in queries - #17966

Merged
vogievetsky merged 4 commits into
apache:masterfrom
vogievetsky:set_syntax
May 1, 2025
Merged

Web console: support SET syntax in queries#17966
vogievetsky merged 4 commits into
apache:masterfrom
vogievetsky:set_syntax

Conversation

@vogievetsky

Copy link
Copy Markdown
Contributor

This PR is the web console follow up to #17894 adds support for parsing and manipulating the new SET syntax. Changes the handling for the now allowed trailing semicolon.

Comment thread web-console/src/utils/druid-query.ts Fixed
Comment thread web-console/src/utils/explain.ts Fixed

@clintropolis clintropolis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 very nice 👍

Comment thread web-console/src/utils/druid-query.ts Outdated
Comment on lines +239 to +242
// Semicolon (;) at the end. https://bit.ly/1n1yfkJ
// ex: SELECT 1;
// ex: Received an unexpected token [;] (line [1], column [9]), acceptable options:
// Missing (;) after SET statement
// ex: SET sqlTimeZone = 'America/Los_Angeles' SELECT * FROM "kttm_simple"
// ex: Received an unexpected token [SELECT] (line [1], column [41]), acceptable options: [<EOF>, <QUOTED_STRING>, ";", "UESCAPE"]
// /Received an unexpected token \[;] \(line \[(\d+)], column \[(\d+)]\),/i

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice repurpose heh 🤘

@vogievetsky
vogievetsky merged commit a23170e into apache:master May 1, 2025
@vogievetsky
vogievetsky deleted the set_syntax branch May 1, 2025 18:14
@capistrant capistrant added this to the 34.0.0 milestone Jul 22, 2025
riovic918data pushed a commit to riovic918data/druid that referenced this pull request Jun 12, 2026
* fix explain and semicolon suggestion

* move Edit context

* update for CodeQL feedback

* removed left over old comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants