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

[Auto Suggest] DQL autosuggest with ANTLR #7391

Merged
merged 47 commits into from
Jul 30, 2024

Commits on Jul 30, 2024

  1. Antlr autocomplete (opensearch-project#7159)

    * dql grammar with rudamentary testing parser
    
    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    
    * show suggestion of fields depending on current index pattern
    
    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    
    * basic code completion with fields populated
    
    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    
    * updated grammar and generated for better group handling
    
    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    
    * add ignored tokens
    
    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    
    * remove console logs
    
    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    
    ---------
    
    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    18ef962 View commit details
    Browse the repository at this point in the history
  2. dql Antlr autocomplete (opensearch-project#7160)

    * re-add provider for sql
    
    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    
    * added temporary fix for language providor to appear for more than one language
    
    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    
    ---------
    
    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    984bd9b View commit details
    Browse the repository at this point in the history
  3. remove EOF in parser to fix suggestions

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    0a5d481 View commit details
    Browse the repository at this point in the history
  4. use custom version of cursor token index for dql

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    5d33ea1 View commit details
    Browse the repository at this point in the history
  5. implemented value suggestions based on field

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    95969f0 View commit details
    Browse the repository at this point in the history
  6. set param type

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    51acd0a View commit details
    Browse the repository at this point in the history
  7. update grouping grammar

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    fefd947 View commit details
    Browse the repository at this point in the history
  8. fix grammar for dots in field and value term search with spaces

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    3d04587 View commit details
    Browse the repository at this point in the history
  9. value suggestions match field to avoid failing api call and to find a…

    …ssc keyword field
    
    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    4282d74 View commit details
    Browse the repository at this point in the history
  10. update value suggestions from partially formed value

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    08807f1 View commit details
    Browse the repository at this point in the history
  11. refactor value suggestions and change fieldval listener to visitor

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    01ec3c7 View commit details
    Browse the repository at this point in the history
  12. implement value suggestions within phrases

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    dc48692 View commit details
    Browse the repository at this point in the history
  13. make grammar more readable

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    9b2b513 View commit details
    Browse the repository at this point in the history
  14. rename grammar parser rules

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    09fc01a View commit details
    Browse the repository at this point in the history
  15. bring back minimal autocomplete optimized grammar

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    d48cab9 View commit details
    Browse the repository at this point in the history
  16. enable partially complete value suggestion for value groups

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    e1d5049 View commit details
    Browse the repository at this point in the history
  17. remove number as lexer rule

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    2e2adca View commit details
    Browse the repository at this point in the history
  18. fix cursor import and clean up

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    cdfd8d0 View commit details
    Browse the repository at this point in the history
  19. fix completion item range to be current word

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    bacb5d8 View commit details
    Browse the repository at this point in the history
  20. update cursor to use monaco position

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    da79597 View commit details
    Browse the repository at this point in the history
  21. cursor index to use position directly

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    792c37c View commit details
    Browse the repository at this point in the history
  22. move language registration into render function to handle new languages

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    760272c View commit details
    Browse the repository at this point in the history
  23. include auto closing quotes and parenthesis for dql

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    30054a8 View commit details
    Browse the repository at this point in the history
  24. rename generated file

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    c46e521 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    698bb38 View commit details
    Browse the repository at this point in the history
  26. add license and fix linting

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    68911aa View commit details
    Browse the repository at this point in the history
  27. modify grammar

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    3b13cf1 View commit details
    Browse the repository at this point in the history
  28. add tests for fields and keywords

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    04e3f61 View commit details
    Browse the repository at this point in the history
  29. move dql test constants to separate file

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    8f36279 View commit details
    Browse the repository at this point in the history
  30. pass core setup from autocomplete constructor to query sugg provider …

    …and utilize selectionEnd if no position
    
    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    9787c6e View commit details
    Browse the repository at this point in the history
  31. update an import

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    99ee35a View commit details
    Browse the repository at this point in the history
  32. use updated dataset for index pattern

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    d6519a3 View commit details
    Browse the repository at this point in the history
  33. remove console log

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    443bf72 View commit details
    Browse the repository at this point in the history
  34. [Auto Suggest] DQL Updates (opensearch-project#7498)

    * update code completion to not return for visualize
    
    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    
    * update types to match completionitemkind
    
    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    
    ---------
    
    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    bdc45c1 View commit details
    Browse the repository at this point in the history
  35. update saved object test flyout snap

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    7a8ef87 View commit details
    Browse the repository at this point in the history
  36. update tests to match changes

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    00fe412 View commit details
    Browse the repository at this point in the history
  37. updated editor

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    3be2116 View commit details
    Browse the repository at this point in the history
  38. insert colon and space after selecting suggested field

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    c799ae5 View commit details
    Browse the repository at this point in the history
  39. fix suggestions after colon without space

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    e65080a View commit details
    Browse the repository at this point in the history
  40. update test

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    c14afd2 View commit details
    Browse the repository at this point in the history
  41. typing update

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    dfe3ffd View commit details
    Browse the repository at this point in the history
  42. updated dataset name

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    da49684 View commit details
    Browse the repository at this point in the history
  43. remove connection service based lines and rely on service

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    d5184f6 View commit details
    Browse the repository at this point in the history
  44. add debouncer for index pattern calls

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    1cd99fd View commit details
    Browse the repository at this point in the history
  45. use index pattern service rather than debounce

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    b1b4095 View commit details
    Browse the repository at this point in the history
  46. update mock index for test

    Signed-off-by: Paul Sebastian <paulstn@amazon.com>
    paulstn committed Jul 30, 2024
    Configuration menu
    Copy the full SHA
    b182ce8 View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    d3db8da View commit details
    Browse the repository at this point in the history