Skip to content

Conversation

@mistercrunch
Copy link
Member

Reserved words should be properly quoted now, indent is arguably better than before
screen shot 2016-10-21 at 12 29 32 am

fields = '*'
table = self.get_table(table_name, schema=schema)
if show_cols:
fields = [quote(c.name) for c in table.columns]
Copy link
Member

Choose a reason for hiding this comment

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

I believe you wanted to quote reserved works only

Copy link
Member Author

Choose a reason for hiding this comment

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

that sqlalchemy function only quotes reserved words


fields = ", ".join(
[c.name for c in t.columns] or "*")
[quote(c.name) for c in t.columns] or "*")
Copy link
Member

Choose a reason for hiding this comment

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

ditto

Copy link
Member Author

Choose a reason for hiding this comment

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

that sqlalchemy function only quotes reserved words

Copy link
Member

Choose a reason for hiding this comment

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

sweet!

@bkyryliuk
Copy link
Member

LGTM, once test is fixed.

@mistercrunch mistercrunch merged commit 63161b1 into apache:master Oct 21, 2016
@mistercrunch mistercrunch deleted the select_star branch October 21, 2016 23:55
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 17, 2021
Co-authored-by: John Bodley <john.bodley@airbnb.com>
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 24, 2021
Co-authored-by: John Bodley <john.bodley@airbnb.com>
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 25, 2021
Co-authored-by: John Bodley <john.bodley@airbnb.com>
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 26, 2021
Co-authored-by: John Bodley <john.bodley@airbnb.com>
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.12.0 First shipped in 0.12.0 labels Feb 19, 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.12.0 First shipped in 0.12.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants