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

[Discover] notify user about field_type_tolerance for SQL/PPL in query footer #8702

Closed

Conversation

joshuali925
Copy link
Member

@joshuali925 joshuali925 commented Oct 24, 2024

Description

Add icon in query editor footer to notify user about limitation in array type in SQL/PPL responses. The icon is present if plugins.query.field_type_tolerance is unset or set to false, clicking on it will open a popover with details. The popover is open by default if user hasn't seen it before (state persisted in localStorage).

This only applies to OpenSearch data sources. If request to cluster settings API failed, it will not display the icon.

This PR also renames SQL to OpenSearch SQL

Issues Resolved

related: opensearch-project/sql#3118

Screenshot

image

Testing the changes

Changelog

  • feat: notify user about field_type_tolerance for SQL/PPL in discover query footer

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

@@ -87,13 +92,16 @@ export class QueryEnhancementsPlugin
editor: enhancedPPLQueryEditor,
editorSupportedAppNames: ['discover'],
supportedAppNames: ['discover', 'data-explorer'],
inputFooterItems: {
Copy link
Member

Choose a reason for hiding this comment

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

Why cant we reuse the editor prop or pass it directly in the editor?

Copy link

codecov bot commented Oct 25, 2024

Codecov Report

Attention: Patch coverage is 78.78788% with 7 lines in your changes missing coverage. Please review.

Project coverage is 60.85%. Comparing base (9a25d0d) to head (48cddb9).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
...itor_extensions/field_type_tolerance_info_icon.tsx 81.25% 3 Missing and 3 partials ⚠️
...nts/public/query_assist/utils/create_extension.tsx 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8702   +/-   ##
=======================================
  Coverage   60.84%   60.85%           
=======================================
  Files        3793     3794    +1     
  Lines       90486    90518   +32     
  Branches    14212    14221    +9     
=======================================
+ Hits        55057    55081   +24     
- Misses      31939    31943    +4     
- Partials     3490     3494    +4     
Flag Coverage Δ
Linux_1 29.07% <ø> (ø)
Linux_2 56.39% <ø> (ø)
Linux_3 ?
Linux_4 29.87% <78.78%> (+0.02%) ⬆️
Windows_1 29.08% <ø> (ø)
Windows_2 56.35% <ø> (ø)
Windows_3 37.67% <ø> (ø)
Windows_4 29.87% <78.78%> (+0.02%) ⬆️

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.

@joshuali925
Copy link
Member Author

this is no longer needed

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

Successfully merging this pull request may close these issues.

2 participants