Skip to content

Complete implementeing SET ROLE feature #2759

Description

@mzitnik

Use case

Currently, our SET ROLE feature is not complete.
A full sysntax SET ROLE {DEFAULT | NONE | role [,...] | ALL | ALL EXCEPT role [,...]}
Let's go over to complete the implementation.

See latest related PR

Activity

  1. added
    jdbc
    on Feb 25, 2026
  2. added this to the 0.9.10 milestone on Apr 15, 2026
  3. modified the milestones: 0.11.0, 0.12.0 on Sep 23, 2026
  4. removed this from the 0.12.0 milestone on Nov 10, 2026
  5. polyglotAI-bot commented on Nov 28, 2026

    @polyglotAI-bot
    Collaborator

    Recommendation: Keep open — implementation needed
    jdbc-v2 applies only SET ROLE <role>[, ...]. DEFAULT, ALL, and ALL EXCEPT make the next queries fail, and NONE keeps the default roles active. No open PR.

    • Category: Feature
    • Classification: impact: none · area: Queries (SET ROLE)
    • Status on main: Not supported on main — a jdbc-v2 program on main (8480ca001), ClickHouse 26.11.2.4, user with roles r1, r2 and default role r2: SET ROLE r1 and SET ROLE r1, r2 give those roles; SET ROLE NONE gives ['r2']; after DEFAULT, ALL, and ALL EXCEPT r1, the next query fails with UNKNOWN_ROLE for the roles DEFAULT, ALL, and ALLEXCEPTr1.
    • Breaking change: No — can be done without a break.
    • Duplicates / related: None found.

    Analysis: The parser takes all text after ROLE as role names: ClickHouseSqlParser.jj:134 splits it at commas and drops the whitespace, so ALL EXCEPT r1 becomes one role ALLEXCEPTr1, and StatementImpl.java:429 sends these names with each later query of the connection. For NONE, SqlParserFacade.java:218-224 clears the list, so later queries send no role and the server applies the user's default roles.

    Automated triage by Polyglot AI. A maintainer makes the final decision.

  6. added
    queries
    sql-parser
    on Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementjdbcqueriessql-parser

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions