Fix limit and offset settings for secondary queries.#59018
Fix limit and offset settings for secondary queries.#59018yakov-olkhovskiy wants to merge 7 commits into
Conversation
|
This is an automated comment for commit 8420c3d with description of existing statuses. It's updated for the latest CI running ❌ Click here to open a full report in a separate page Successful checks
|
|
@yakov-olkhovskiy It is intended to work this way. You can change it, but it should be labeled as a backward incompatible change and we should add a compatibility setting. |
|
@alexey-milovidov yes, I already somehow investigated this - the test which is failing seems to indicate that it was intended at least at some point, but I find it inconsistent - we have context itself, then query context, session context and global context within - I don't exactly understand what the difference then and the usage seems inconsistent - I want to discuss it with the team to decide how we want it... |
|
Yes, I also checked... the reason I tell is because I remember how, and why I've added this table :) So, when it was developed, the intent was to show the settings effective for this particular query from Then I checked the docs, and it stated that it shows session-level settings, which is surprising. Maybe it was lost when the docs were written. I don't mind changing this behavior, so your change is good for me. |
|
In analyzer we calculate effective limit and offset as a query expression and put it into query tree, and remove from setting to prevent further interference: Of course this problem can be addressed differently - instead removing from settings I can find further interference and prevent it... I think it's a better approach than changing meaning of system.settings. Will do this. |
|
A test has failed. |
|
Dear @yakov-olkhovskiy, this PR hasn't been updated for a while. Will you continue working on it? If not, please close it. Otherwise, ignore this message. |
1 similar comment
|
Dear @yakov-olkhovskiy, this PR hasn't been updated for a while. Will you continue working on it? If not, please close it. Otherwise, ignore this message. |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fix - for all secondary queries limit and offset should be reset in context. Table system.setting should take values from query context.
closes #58918