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

Refactor sql editor autocomplete #8967

Merged

Conversation

etr2460
Copy link
Member

@etr2460 etr2460 commented Jan 14, 2020

CATEGORY

Choose one

  • Bug Fix
  • Enhancement (new features, refinement)
  • Refactor
  • Add tests
  • Build / Development Environment
  • Documentation

SUMMARY

Moves constants into the constants file, the sqlKeywords array into a separate util file that other components can import, make the util file use typescript, and remove the string splitting on |

TEST PLAN

Ensure SQL keywords autocomplete in SQL Lab, the metric editor popover and the filter editor popover

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

REVIEWERS

to: @graceguo-supercat @mistercrunch @willbarrett

@etr2460 etr2460 force-pushed the erik-ritter--sql-editor-autocomplete-refactor branch from 8f94016 to 142eef5 Compare January 14, 2020 23:54
@codecov-io
Copy link

codecov-io commented Jan 15, 2020

Codecov Report

Merging #8967 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8967      +/-   ##
==========================================
+ Coverage   58.68%   58.69%   +<.01%     
==========================================
  Files         362      363       +1     
  Lines       11415    11417       +2     
  Branches     2801     2801              
==========================================
+ Hits         6699     6701       +2     
  Misses       4538     4538              
  Partials      178      178
Impacted Files Coverage Δ
.../assets/src/SqlLab/components/AceEditorWrapper.jsx 55.69% <ø> (-4.08%) ⬇️
superset/assets/src/SqlLab/constants.js 100% <100%> (ø) ⬆️
...components/AdhocFilterEditPopoverSqlTabContent.jsx 64.86% <100%> (ø) ⬆️
.../src/explore/components/AdhocMetricEditPopover.jsx 62.35% <100%> (ø) ⬆️
superset/assets/src/SqlLab/utils/sqlKeywords.ts 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 614f133...2887aa4. Read the comment docs.

import { SQL_KEYWORD_AUTOCOMPLETE_SCORE } from '../constants';

const SQL_KEYWORDS = [
'SELECT',
Copy link
Member

Choose a reason for hiding this comment

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

[optional] could sort alphabetically

Copy link
Member Author

Choose a reason for hiding this comment

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

good call, sorted

@etr2460 etr2460 force-pushed the erik-ritter--sql-editor-autocomplete-refactor branch from 142eef5 to 2887aa4 Compare January 15, 2020 18:07
@etr2460 etr2460 merged commit ff9bc74 into apache:master Jan 15, 2020
@etr2460 etr2460 deleted the erik-ritter--sql-editor-autocomplete-refactor branch January 15, 2020 21:06
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.36.0 labels Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/L 🚢 0.36.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants