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

Improve the error message when there is a typo in the column name in the query. #1267

Conversation

xzdandy
Copy link
Collaborator

@xzdandy xzdandy commented Oct 7, 2023

  • Add basic functionality

Below is the example error message:

evadb.binder.binder_utils.BinderError: Cannnot find column name2. Did you mean name? The available columns are ['avatar_url', 'bio', 'blog', 'collaborators', 'company', 'contributions', 'disk_usage', 'email', 'events_url', 'followers', 'followers_url', 'following', 'following_url', 'gists_url', 'gravatar_id', 'hireable', 'html_url', 'id', 'invitation_teams_url', 'location', 'login', 'name', 'node_id', 'organizations_url', 'owned_private_repos', 'private_gists', 'public_gists', 'public_repos', 'received_events_url', 'repos_url', 'role', 'site_admin', 'starred_url', 'subscriptions_url', 'team_count', 'total_private_repos', 'twitter_username', 'type', 'url'].

Limitation: To keep the output clean, we only do fuzzy match on the columns and skip the alias.

  • Add testcases.

@xzdandy xzdandy marked this pull request as ready for review October 7, 2023 17:48
@xzdandy xzdandy added this to the v0.3.8 milestone Oct 7, 2023
@gaurav274 gaurav274 merged commit c95e6aa into staging Oct 8, 2023
@gaurav274 gaurav274 deleted the 1263-give-a-list-of-columns-and-suggest-columns-when-the-user-types-in-a-column-that-does-not-exist-in-the-table branch October 8, 2023 17:06
a0x8o pushed a commit to alexxx-db/eva that referenced this pull request Oct 30, 2023
…the query. (georgia-tech-db#1267)

- [x] Add basic functionality

Below is the example error message:

```
evadb.binder.binder_utils.BinderError: Cannnot find column name2. Did you mean name? The available columns are ['avatar_url', 'bio', 'blog', 'collaborators', 'company', 'contributions', 'disk_usage', 'email', 'events_url', 'followers', 'followers_url', 'following', 'following_url', 'gists_url', 'gravatar_id', 'hireable', 'html_url', 'id', 'invitation_teams_url', 'location', 'login', 'name', 'node_id', 'organizations_url', 'owned_private_repos', 'private_gists', 'public_gists', 'public_repos', 'received_events_url', 'repos_url', 'role', 'site_admin', 'starred_url', 'subscriptions_url', 'team_count', 'total_private_repos', 'twitter_username', 'type', 'url'].
```

**Limitation**: To keep the output clean, we only do fuzzy match on the
columns and skip the alias.

- [x] Add testcases.
a0x8o pushed a commit to alexxx-db/eva that referenced this pull request Nov 22, 2023
…the query. (georgia-tech-db#1267)

- [x] Add basic functionality

Below is the example error message:

```
evadb.binder.binder_utils.BinderError: Cannnot find column name2. Did you mean name? The available columns are ['avatar_url', 'bio', 'blog', 'collaborators', 'company', 'contributions', 'disk_usage', 'email', 'events_url', 'followers', 'followers_url', 'following', 'following_url', 'gists_url', 'gravatar_id', 'hireable', 'html_url', 'id', 'invitation_teams_url', 'location', 'login', 'name', 'node_id', 'organizations_url', 'owned_private_repos', 'private_gists', 'public_gists', 'public_repos', 'received_events_url', 'repos_url', 'role', 'site_admin', 'starred_url', 'subscriptions_url', 'team_count', 'total_private_repos', 'twitter_username', 'type', 'url'].
```

**Limitation**: To keep the output clean, we only do fuzzy match on the
columns and skip the alias.

- [x] Add testcases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Give a list of columns and suggest columns when the user types in a column that does not exist in the table.
2 participants