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

Fix bug 1529388 - don't include column type in autocomplete results. #832

Merged
merged 2 commits into from
Feb 25, 2019

Conversation

jezdez
Copy link

@jezdez jezdez commented Feb 21, 2019

This also fixes an issue with the Postgres query runner not showing the actual column type but the table name.

@jezdez jezdez requested a review from washort February 21, 2019 17:37
@jezdez jezdez added this to the 20 milestone Feb 21, 2019
@@ -40,6 +40,9 @@ function buildKeywordsFromSchema(schema) {
schema.forEach((table) => {
keywords[table.name] = 'Table';
table.columns.forEach((c) => {
if (c.length > 0) {
c = c.split('(')[0];
Copy link

Choose a reason for hiding this comment

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

If we send this upstream we'll probably want to do something different from pushing the column type info into this string and stripping it back out again like this.

Copy link
Author

Choose a reason for hiding this comment

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

Oh, that's a feature that hasn't been upstreamed since it was denied there. Instead the schema browser rewrite has been started, e.g. @emtwo's schema drawer.

Copy link
Author

Choose a reason for hiding this comment

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

In other words, this is just a fix for 17290cb until we get the schema drawer functionality.

@@ -140,7 +140,7 @@ def _get_tables(self, schema):
AND a.attnum > 0
AND NOT a.attisdropped
JOIN pg_type t
ON c.reltype = t.oid
ON a.atttypid = t.oid
Copy link

Choose a reason for hiding this comment

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

Interesting, what was the difference here?

Copy link
Author

Choose a reason for hiding this comment

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

It was showing the table name instead of the column type. Check it out with the Redash metadata data source in the stage or RC environment.

@jezdez jezdez merged commit 66501c1 into master Feb 25, 2019
@jezdez jezdez deleted the bug1529388 branch February 25, 2019 11:25
jezdez pushed a commit that referenced this pull request Mar 25, 2019
Also:

Fix bug 1529388 - don't include column type in autocomplete results. (#832)
washort pushed a commit that referenced this pull request Mar 26, 2019
Also:

Fix bug 1529388 - don't include column type in autocomplete results. (#832)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants