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

SQL pagination should work with the pretty parameter #2759

Merged
merged 6 commits into from
Jul 15, 2024

Conversation

LantaoJin
Copy link
Member

@LantaoJin LantaoJin commented Jun 17, 2024

Description

  1. Refactoring isSupported() improves readability by clearly defining each condition and simplifying the overall logic.
  2. PRETTY (plus FORMAT) parameters should be treated as supported in validating Cursor request.

Issues Resolved

resolves #2460

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Lantao Jin <ltjin@amazon.com>
@LantaoJin LantaoJin changed the title SQL pagination should work with the pretty parameter SQL pagination should work with the pretty parameter Jun 17, 2024
Signed-off-by: Lantao Jin <ltjin@amazon.com>
Signed-off-by: Lantao Jin <ltjin@amazon.com>
Copy link

codecov bot commented Jun 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.14%. Comparing base (7b40c2c) to head (bb29410).
Report is 5 commits behind head on main.

Current head bb29410 differs from pull request most recent head 6607f35

Please upload reports for the commit 6607f35 to get more accurate results.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #2759   +/-   ##
=========================================
  Coverage     92.14%   92.14%           
  Complexity     4960     4960           
=========================================
  Files           496      496           
  Lines         14341    14345    +4     
  Branches        942      945    +3     
=========================================
+ Hits          13214    13218    +4     
  Misses         1091     1091           
  Partials         36       36           
Flag Coverage Δ
sql-engine 92.14% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

penghuo
penghuo previously approved these changes Jun 20, 2024
dai-chen
dai-chen previously approved these changes Jun 24, 2024
Copy link
Collaborator

@dai-chen dai-chen left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

boolean hasQuery = query != null;
boolean hasContent = jsonContent != null && !jsonContent.isEmpty();

Predicate<String> supportedParams = List.of(QUERY_PARAMS_FORMAT, QUERY_PARAMS_PRETTY)::contains;
Copy link
Member

Choose a reason for hiding this comment

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

[NIT]won't Set.of would be more appropriate here?

@vamsi-amazon
Copy link
Member

Any ITs with pretty parameter? Is pretty parameter working?

@vamsi-amazon vamsi-amazon added the bug Something isn't working label Jun 24, 2024
@LantaoJin
Copy link
Member Author

LantaoJin commented Jun 25, 2024

Any ITs with pretty parameter? Is pretty parameter working?

Currently we don't have a dedicated IT for testing pretty parameter. But we added some tests in CursorIT with c25aca6#diff-478b4af66a28fbcde418ed236aac5dde3903d573bfb6c016e3a43189e028c0e2R245

Signed-off-by: Lantao Jin <ltjin@amazon.com>
@LantaoJin LantaoJin dismissed stale reviews from dai-chen and penghuo via c25aca6 June 25, 2024 06:56
@LantaoJin
Copy link
Member Author

Hi @vamsi-amazon @penghuo @dai-chen, could you review and approve this PR again since I addressed comments.

Signed-off-by: Lantao Jin <ltjin@amazon.com>
@LantaoJin
Copy link
Member Author

None of build issues are related to this code changes. But anyone knows why our CI has lots of failures in recent one or two weeks?

@penghuo penghuo merged commit 0c2e1da into opensearch-project:main Jul 15, 2024
11 of 12 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 15, 2024
Signed-off-by: Lantao Jin <ltjin@amazon.com>
(cherry picked from commit 0c2e1da)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
manasvinibs pushed a commit to manasvinibs/sql that referenced this pull request Jul 16, 2024
manasvinibs pushed a commit to manasvinibs/sql that referenced this pull request Aug 14, 2024
jzonthemtn pushed a commit to jzonthemtn/sql that referenced this pull request Aug 28, 2024
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 23, 2024
Signed-off-by: Lantao Jin <ltjin@amazon.com>
(cherry picked from commit 0c2e1da)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] SQL pagination doesn't work in Dev tools
5 participants