Skip to content

Conversation

@gertjanal
Copy link
Contributor

@gertjanal gertjanal commented Oct 22, 2025

Description

Added some missing documentation about the system.runtime.kill_query() procedure in Ranger and Resource group sections.

Release notes

( X ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text:

Summary by Sourcery

Add documentation about the system.runtime.kill_query() procedure in the resource groups guide and the Ranger access control guide

Documentation:

  • Explain that the kill_query procedure should use the DATA_DEFINITION queryType to bypass queuing in resource groups
  • Add a Ranger policy example for granting execute permission on the system.runtime.kill_query procedure

@cla-bot cla-bot bot added the cla-signed label Oct 22, 2025
@sourcery-ai
Copy link

sourcery-ai bot commented Oct 22, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR fills in missing documentation for the system.runtime.kill_query() procedure by adding guidance in both the Resource Group and Ranger Access Control sections to ensure users properly configure permissions and query type for direct execution of kill_query.

Entity relationship diagram for Ranger policy configuration for kill_query

erDiagram
    USER ||--o{ POLICY : has
    POLICY {
      string schema
      string database
      string procedure
      string permission
    }
    POLICY ||--o{ PROCEDURE : applies_to
    PROCEDURE {
      string name
    }
    USER {
      string user_id
    }
Loading

File-Level Changes

Change Details Files
Documented kill_query usage in Resource Groups
  • Added note that external clients using system.runtime.kill_query() should specify DATA_DEFINITION queryType
  • Clarified that this ensures kill_query is executed immediately rather than queued
docs/src/main/sphinx/admin/resource-groups.md
Documented kill_query permissions in Ranger ACL
  • Added bullet advising to grant execute permission for system.runtime.kill_query() via a Ranger policy
  • Specified schema, database, procedure, and permission settings for the policy
docs/src/main/sphinx/security/ranger-access-control.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@gertjanal gertjanal requested a review from mosabua October 22, 2025 18:26
@github-actions github-actions bot added the docs label Oct 22, 2025
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

`CREATE`, `ALTER`, and `DROP` statements for schemas, tables, views, and
materialized views, as well as statements that manage prepared statements,
privileges, sessions, and transactions.
privileges, sessions, and transactions. Also when external clients need the
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
privileges, sessions, and transactions. Also when external clients need the
privileges, sessions, and transactions. When external clients need access to the

materialized views, as well as statements that manage prepared statements,
privileges, sessions, and transactions.
privileges, sessions, and transactions. Also when external clients need the
`system.runtime.kill_query()` procedure to kill queries, this `queryType`
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
`system.runtime.kill_query()` procedure to kill queries, this `queryType`
`system.runtime.kill_query()` procedure to stop running queries, this `queryType`

privileges, sessions, and transactions.
privileges, sessions, and transactions. Also when external clients need the
`system.runtime.kill_query()` procedure to kill queries, this `queryType`
should be used to make sure the `kill_query()` is executed directly and
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
should be used to make sure the `kill_query()` is executed directly and
must be used to make sure the `kill_query()` is executed directly and

execute any query.
* To allow this, create a policy in Apache Ranger for a `trinouser` resource
with value `{USER}` and with the `impersonate` permission for user `{USER}`.
* External clients might use the `system.runtime.kill_query()` procedure to
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* External clients might use the `system.runtime.kill_query()` procedure to
* External clients can use the `system.runtime.kill_query()` procedure to

* To allow this, create a policy in Apache Ranger for a `trinouser` resource
with value `{USER}` and with the `impersonate` permission for user `{USER}`.
* External clients might use the `system.runtime.kill_query()` procedure to
kill running queries by id. Add a policy with Schema `system`, Database
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
kill running queries by id. Add a policy with Schema `system`, Database
kill running queries. Add a policy with Schema `system`, Database

privileges, sessions, and transactions. Also when external clients need the
`system.runtime.kill_query()` procedure to kill queries, this `queryType`
should be used to make sure the `kill_query()` is executed directly and
isn't queued to wait for the initial query to finish.
Copy link
Member

Choose a reason for hiding this comment

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

Did you verify this behavior with testing it manually?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants