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
Conversation
mistercrunch
commented
Aug 7, 2018
•
edited
edited
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
There was a problem hiding this 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+$/; |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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'
.
Addressed comments, merging. |
* [sql lab] visualization flow to detect unaliased columns * Addressing comments