You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/01/14 23:07:13 UTC

[GitHub] [incubator-superset] etr2460 opened a new pull request #8967: Refactor sql editor autocomplete

etr2460 opened a new pull request #8967: Refactor sql editor autocomplete
URL: https://github.com/apache/incubator-superset/pull/8967
 
 
   ### CATEGORY
   
   Choose one
   
   - [ ] Bug Fix
   - [ ] Enhancement (new features, refinement)
   - [x] 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
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] 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 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] etr2460 merged pull request #8967: Refactor sql editor autocomplete

Posted by GitBox <gi...@apache.org>.
etr2460 merged pull request #8967: Refactor sql editor autocomplete
URL: https://github.com/apache/incubator-superset/pull/8967
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] mistercrunch commented on a change in pull request #8967: Refactor sql editor autocomplete

Posted by GitBox <gi...@apache.org>.
mistercrunch commented on a change in pull request #8967: Refactor sql editor autocomplete
URL: https://github.com/apache/incubator-superset/pull/8967#discussion_r366662098
 
 

 ##########
 File path: superset/assets/src/SqlLab/utils/sqlKeywords.ts
 ##########
 @@ -0,0 +1,105 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { SQL_KEYWORD_AUTOCOMPLETE_SCORE } from '../constants';
+
+const SQL_KEYWORDS = [
+  'SELECT',
 
 Review comment:
   [optional] could sort alphabetically

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] etr2460 commented on a change in pull request #8967: Refactor sql editor autocomplete

Posted by GitBox <gi...@apache.org>.
etr2460 commented on a change in pull request #8967: Refactor sql editor autocomplete
URL: https://github.com/apache/incubator-superset/pull/8967#discussion_r367032018
 
 

 ##########
 File path: superset/assets/src/SqlLab/utils/sqlKeywords.ts
 ##########
 @@ -0,0 +1,105 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { SQL_KEYWORD_AUTOCOMPLETE_SCORE } from '../constants';
+
+const SQL_KEYWORDS = [
+  'SELECT',
 
 Review comment:
   good call, sorted

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] codecov-io edited a comment on issue #8967: Refactor sql editor autocomplete

Posted by GitBox <gi...@apache.org>.
codecov-io edited a comment on issue #8967: Refactor sql editor autocomplete
URL: https://github.com/apache/incubator-superset/pull/8967#issuecomment-574433809
 
 
   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/8967?src=pr&el=h1) Report
   > Merging [#8967](https://codecov.io/gh/apache/incubator-superset/pull/8967?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/614f13377b2dbbae98aa6f5470a218162a060ea6?src=pr&el=desc) will **increase** coverage by `<.01%`.
   > The diff coverage is `100%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/8967/graphs/tree.svg?width=650&token=KsB0fHcx6l&height=150&src=pr)](https://codecov.io/gh/apache/incubator-superset/pull/8967?src=pr&el=tree)
   
   ```diff
   @@            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](https://codecov.io/gh/apache/incubator-superset/pull/8967?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [.../assets/src/SqlLab/components/AceEditorWrapper.jsx](https://codecov.io/gh/apache/incubator-superset/pull/8967/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXNzZXRzL3NyYy9TcWxMYWIvY29tcG9uZW50cy9BY2VFZGl0b3JXcmFwcGVyLmpzeA==) | `55.69% <ø> (-4.08%)` | :arrow_down: |
   | [superset/assets/src/SqlLab/constants.js](https://codecov.io/gh/apache/incubator-superset/pull/8967/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXNzZXRzL3NyYy9TcWxMYWIvY29uc3RhbnRzLmpz) | `100% <100%> (ø)` | :arrow_up: |
   | [...components/AdhocFilterEditPopoverSqlTabContent.jsx](https://codecov.io/gh/apache/incubator-superset/pull/8967/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXNzZXRzL3NyYy9leHBsb3JlL2NvbXBvbmVudHMvQWRob2NGaWx0ZXJFZGl0UG9wb3ZlclNxbFRhYkNvbnRlbnQuanN4) | `64.86% <100%> (ø)` | :arrow_up: |
   | [.../src/explore/components/AdhocMetricEditPopover.jsx](https://codecov.io/gh/apache/incubator-superset/pull/8967/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXNzZXRzL3NyYy9leHBsb3JlL2NvbXBvbmVudHMvQWRob2NNZXRyaWNFZGl0UG9wb3Zlci5qc3g=) | `62.35% <100%> (ø)` | :arrow_up: |
   | [superset/assets/src/SqlLab/utils/sqlKeywords.ts](https://codecov.io/gh/apache/incubator-superset/pull/8967/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXNzZXRzL3NyYy9TcWxMYWIvdXRpbHMvc3FsS2V5d29yZHMudHM=) | `100% <100%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/8967?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/8967?src=pr&el=footer). Last update [614f133...2887aa4](https://codecov.io/gh/apache/incubator-superset/pull/8967?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] codecov-io commented on issue #8967: Refactor sql editor autocomplete

Posted by GitBox <gi...@apache.org>.
codecov-io commented on issue #8967: Refactor sql editor autocomplete
URL: https://github.com/apache/incubator-superset/pull/8967#issuecomment-574433809
 
 
   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/8967?src=pr&el=h1) Report
   > Merging [#8967](https://codecov.io/gh/apache/incubator-superset/pull/8967?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/614f13377b2dbbae98aa6f5470a218162a060ea6?src=pr&el=desc) will **increase** coverage by `<.01%`.
   > The diff coverage is `100%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/8967/graphs/tree.svg?width=650&token=KsB0fHcx6l&height=150&src=pr)](https://codecov.io/gh/apache/incubator-superset/pull/8967?src=pr&el=tree)
   
   ```diff
   @@            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](https://codecov.io/gh/apache/incubator-superset/pull/8967?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [.../assets/src/SqlLab/components/AceEditorWrapper.jsx](https://codecov.io/gh/apache/incubator-superset/pull/8967/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXNzZXRzL3NyYy9TcWxMYWIvY29tcG9uZW50cy9BY2VFZGl0b3JXcmFwcGVyLmpzeA==) | `55.69% <ø> (-4.08%)` | :arrow_down: |
   | [superset/assets/src/SqlLab/constants.js](https://codecov.io/gh/apache/incubator-superset/pull/8967/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXNzZXRzL3NyYy9TcWxMYWIvY29uc3RhbnRzLmpz) | `100% <100%> (ø)` | :arrow_up: |
   | [...components/AdhocFilterEditPopoverSqlTabContent.jsx](https://codecov.io/gh/apache/incubator-superset/pull/8967/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXNzZXRzL3NyYy9leHBsb3JlL2NvbXBvbmVudHMvQWRob2NGaWx0ZXJFZGl0UG9wb3ZlclNxbFRhYkNvbnRlbnQuanN4) | `64.86% <100%> (ø)` | :arrow_up: |
   | [.../src/explore/components/AdhocMetricEditPopover.jsx](https://codecov.io/gh/apache/incubator-superset/pull/8967/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXNzZXRzL3NyYy9leHBsb3JlL2NvbXBvbmVudHMvQWRob2NNZXRyaWNFZGl0UG9wb3Zlci5qc3g=) | `62.35% <100%> (ø)` | :arrow_up: |
   | [superset/assets/src/SqlLab/utils/sqlKeywords.ts](https://codecov.io/gh/apache/incubator-superset/pull/8967/diff?src=pr&el=tree#diff-c3VwZXJzZXQvYXNzZXRzL3NyYy9TcWxMYWIvdXRpbHMvc3FsS2V5d29yZHMudHM=) | `100% <100%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/8967?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/8967?src=pr&el=footer). Last update [614f133...142eef5](https://codecov.io/gh/apache/incubator-superset/pull/8967?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org