drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-5868) Support SQL syntax highlighting of queries
Date Thu, 18 Jan 2018 15:56:00 GMT

    [ https://issues.apache.org/jira/browse/DRILL-5868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16330665#comment-16330665
] 

ASF GitHub Bot commented on DRILL-5868:
---------------------------------------

Github user kkhatua commented on a diff in the pull request:

    https://github.com/apache/drill/pull/1084#discussion_r162384019
  
    --- Diff: exec/java-exec/src/main/resources/rest/profile/profile.ftl ---
    @@ -77,16 +84,17 @@ table.sortable thead .sorting_desc { background-image: url("/static/img/black-de
           <p>
     
             <#if model.isOnlyImpersonationEnabled()>
    +          <div id="query-editor" class="form-group">${model.getProfile().query}</div>
    +          <input class="form-control" id="query" name="query" type="hidden" value="${model.getProfile().query}"/>
               <div class="form-group">
                 <label for="userName">User Name</label>
                 <input type="text" size="30" name="userName" id="userName" placeholder="User
Name" value="${model.getProfile().user}">
               </div>
             </#if>
     
             <form role="form" id="queryForm" action="/query" method="POST">
    -          <div class="form-group">
    -            <textarea class="form-control" id="query" name="query" style="font-family:
Courier;">${model.getProfile().query}</textarea>
    -          </div>
    +          <div id="query-editor" class="form-group">${model.getProfile().query}</div>
    +          <input class="form-control" id="query" name="query" type="hidden" value="${model.getProfile().query}"/>
    --- End diff --
    
    Let me take a look. This might have slipped past during a merge conflict. 


> Support SQL syntax highlighting of queries
> ------------------------------------------
>
>                 Key: DRILL-5868
>                 URL: https://issues.apache.org/jira/browse/DRILL-5868
>             Project: Apache Drill
>          Issue Type: New Feature
>          Components: Web Server
>    Affects Versions: 1.12.0
>            Reporter: Kunal Khatua
>            Assignee: Kunal Khatua
>            Priority: Minor
>              Labels: doc-impacting
>             Fix For: 1.13.0
>
>         Attachments: SnippetExample.png
>
>
> Based on the commit for DRILL-5981 ([PR #1043|https://github.com/apache/drill/pull/1043]),
this JIRA's commit further leverages the Ace JavaScript library with customizations specific
to Drill.
> This introduces the following to Drill:
> # Syntax highlighting (This is also supported for submitted query profiles)
> # Auto-complete supported in all SQL editors (including the Edit Query tab within an
existing profile to rerunning the query). 
>   For browsers like Chrome, you should be able to type {{Ctrl+Space}} to show a drop
down list for use. Arrow keys are used for navigating to the desired option.
> # Specifying Drill specific keywords and functions in visible autocomplete
> # Key snippets (template SQLs) allowing for rapid writing of syntax:
>     i. Query System Tables
>     ii. CView, CTAS, CTempTAS and CFuncJar
>     iii. Alter Session
>     iv. Explain and Select * queries
> This is done by leveraging the *Snippets* feature in the Ace library, which allows for
writing SQL code from templates. Like auto-complete, this will insert a template for you.
The required/optional fields are then selected (in order) for you to populate, as you complete
each and navigate to the next using {{Tab}}.
> NOTE: The lists for items 3 and 4 are not exhaustive. As more features are added to Drill,
these lists can be expanded.
> *Snapshot:*
> !SnippetExample.png|Snippets in Action!



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message