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

[sql lab] visualization flow to detect unaliased columns #5579

Merged
merged 2 commits into from Aug 9, 2018

Conversation

mistercrunch
Copy link
Member

@mistercrunch mistercrunch commented Aug 7, 2018

screen shot 2018-08-06 at 9 31 19 pm

@codecov-io
Copy link

codecov-io commented Aug 7, 2018

Codecov Report

Merging #5579 into master will increase coverage by 0.01%.
The diff coverage is 62.5%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5579      +/-   ##
==========================================
+ Coverage   63.58%   63.59%   +0.01%     
==========================================
  Files         358      359       +1     
  Lines       22742    22802      +60     
  Branches     2530     2534       +4     
==========================================
+ Hits        14461    14502      +41     
- Misses       8266     8285      +19     
  Partials       15       15
Impacted Files Coverage Δ
...ets/src/SqlLab/components/ExploreResultsButton.jsx 82.97% <62.5%> (-4.21%) ⬇️
superset/assets/src/components/Button.jsx 90.9% <0%> (-9.1%) ⬇️
superset/models/core.py 85.16% <0%> (-1.29%) ⬇️
superset/models/__init__.py 100% <0%> (ø) ⬆️
superset/models/user_attributes.py 100% <0%> (ø)
superset/views/core.py 73.83% <0%> (ø) ⬆️
superset/config.py 92.59% <0%> (+0.05%) ⬆️
...uperset/assets/src/datasource/DatasourceEditor.jsx 72.92% <0%> (+0.15%) ⬆️

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 ad469c7...d451aaf. Read the comment docs.

Copy link
Member

@betodealmeida betodealmeida left a comment

Choose a reason for hiding this comment

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

Regex change

@@ -65,6 +81,10 @@ class ExploreResultsButton extends React.PureComponent {
getQueryDuration() {
return moment.duration(this.props.query.endDttm - this.props.query.startDttm).asSeconds();
}
getInvalidColumns() {
const re = /^\w+$/;
Copy link
Member

Choose a reason for hiding this comment

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

It might be better to use /^[A-Za-z_]\w*/ here, to avoid SELECT COUNT(1) AS 123.

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, added some tests for 'a', '1', '123'.

@mistercrunch
Copy link
Member Author

Addressed comments, merging.

@mistercrunch mistercrunch merged commit f4b45f0 into apache:master Aug 9, 2018
wenchma pushed a commit to wenchma/incubator-superset that referenced this pull request Nov 16, 2018
* [sql lab] visualization flow to detect unaliased columns

* Addressing comments
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.28.0 labels Feb 27, 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 🚢 0.28.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants