Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hotfix]Fix the incorrent paramater transmission of PageNum and PageSize #3343

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zhangwl9
Copy link
Contributor

Why are the changes needed?

Close #xxx.

Brief change log

We need to to transmit parameters of pageNum and pageSize in 'PageHelper#startPage' and the TableMetaMapper#selectTableRuntimesForOptimizerGroup,OptimizingMapper#selectOptimizingProcesses.

We correct the inconsistent problem.

How was this patch tested?

  • Add some test cases that check the changes thoroughly including negative and positive cases if possible

  • Add screenshots for manual tests if appropriate

  • Run test locally before making a pull request

Documentation

  • Does this pull request introduce a new feature? (yes / no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

…and pageSize in 'PageHelper#startPage' and the TableMetaMapper#selectTableRuntimesForOptimizerGroup,OptimizingMapper#selectOptimizingProcesses
@github-actions github-actions bot added the module:ams-server Ams server module label Nov 25, 2024
@zhangwl9 zhangwl9 changed the title [hotfix]Fix the incorrent paramater transmission in 'PageHelper#startPage' and the TableMetaMapper#selectTableRuntimesForOptimizerGroup,OptimizingMapper#selectOptimizingProcesses. [hotfix]Fix the incorrent paramater transmission in 'PageHelper#startPage' Nov 25, 2024
@zhangwl9 zhangwl9 changed the title [hotfix]Fix the incorrent paramater transmission in 'PageHelper#startPage' [hotfix]Fix the incorrent paramater transmission of PageNum and PageSize Nov 25, 2024
@zhangwl9
Copy link
Contributor Author

@klion26 @czy006 Could you please take a look at this when you're free, thanks

@klion26
Copy link
Member

klion26 commented Nov 25, 2024

@zhangwl9 thanks for the contribution, the change here LGTM.

As there was some ut want to cover the logic, so could you please help to check

  1. if the logic here in the master is right or not(if the code logic in the master branch can give the right result, maybe it is because the parameter in PageHelper.startPage(pageNumber, limit, true) -- line 517 has a higher priority than the parameter in the mapper)
  2. if the logic here in the master is wrong, could you please help to enhance the exist ut to cover the logic

Copy link
Contributor

@baiyangtx baiyangtx left a comment

Choose a reason for hiding this comment

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

After introducing github.PageHelper, do we still need to pass the pageNumber and limit parameters to the mapper?

It seems that these two parameters are not required in the process of constructing SQL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module:ams-server Ams server module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants