Skip to content

IGNITE-28730 Add query parameters to SQL heavy query warnings - #13745

Open
rezataroosheh wants to merge 1 commit into
apache:masterfrom
rezataroosheh:IGNITE-28730
Open

rezataroosheh wants to merge 1 commit into
apache:masterfrom
rezataroosheh:IGNITE-28730

Conversation

@rezataroosheh

@rezataroosheh rezataroosheh commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

What

Heavy query warnings ("Query execution is too long", "Long running query is finished", "Query produced big result set") now contain the bound parameter values as params=[...] when IGNITE_TO_STRING_INCLUDE_SENSITIVE is enabled. When it is disabled, parameters are not printed.

Long running query is finished [..., sql='SELECT sleep_func(?, 0)', params=[1001], plan=...]

Both engines are covered:

  • H2: LOCAL, MAP and REDUCE queries. MAP queries print only the parameters used by the map query.
  • Calcite: also covered, since it is now the default engine (IGNITE-29117). Its warning was missing the closing quote after sql='...', so that is fixed too, to keep parameters apart from the SQL text.

Why

The warnings show the SQL text but not the parameter values, so it is hard to find which values caused a slow query or a big result set.

Tests

  • LongRunningQueryTest#testQueryParameters: H2 LOCAL, MAP and REDUCE queries.
  • SqlDiagnosticIntegrationTest#testLongQueryParametersInLog: Calcite.

Both check that parameters print when sensitive data is enabled and don't print when it is disabled.

Notes for review

  • IGNITE_TO_STRING_INCLUDE_SENSITIVE is true by default, so parameters are printed by default. This is the same as SQL literals, which are also printed unless you disable the flag.
  • Parameters are printed with S.arrayToString, so the number of values is limited by IGNITE_TO_STRING_COLLECTION_LIMIT. A single value's length is not limited, the same as the sql and plan parts of the warning.
  • DML warnings (H2DmlInfo) are not changed.

The Contribution Checklist

  • There is a single JIRA ticket related to the pull request.
  • The web-link to the pull request is attached to the JIRA ticket.
  • The JIRA ticket has the Patch Available state.
  • The pull request body describes changes that have been made.
    The description explains WHAT and WHY was made instead of HOW.
  • The pull request title is treated as the final commit message.
    The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
  • A reviewer has been mentioned through the JIRA comments
    (see the Maintainers list)
  • The pull request has been checked by the Teamcity Bot and
    the green visa attached to the JIRA ticket (see tab PR Check at TC.Bot - Instance 1 or TC.Bot - Instance 2)

Notes

If you need any help, please email dev@ignite.apache.org or ask any advice on https://the-asf.slack.com #ignite channel.

@rezataroosheh
rezataroosheh marked this pull request as ready for review October 24, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant