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

40-csvql: Setting column Source to be the table name #92

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

djhworld
Copy link

@djhworld djhworld commented Nov 10, 2018

Just a small issue.

With the code in the video, if you try and apply a projection to a query, you get this error

mysql> select name from cities;
ERROR 1105 (HY000): unknown error: table "cities" does not have column "name"

This is because the Source attribute in the Column was being set as the path of the CSV file, rather than the table name.

This PR fixes issue #93

mysql> select name, country from cities where country <> 'USA';
+-----------+---------+
| name      | country |
+-----------+---------+
| Barcelona | Spain   |
| Paris     | France  |
| Shanghai  | China   |
+-----------+---------+
3 rows in set (0.00 sec)

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.

1 participant