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

Dropping table with SQL has strange consequences #538

Open
curlette opened this issue Mar 4, 2017 · 3 comments
Open

Dropping table with SQL has strange consequences #538

curlette opened this issue Mar 4, 2017 · 3 comments

Comments

@curlette
Copy link
Contributor

curlette commented Mar 4, 2017

If you drop table with %sql, then the internal cleanup that happens if it were dropped with %bql does not happen. In particular, I ran into this bug:

  1. Created a table t with %bql without column x.
  2. Created population p for t.
  3. Dropped p, then dropped t via %sql.
  4. Recreated t (same name) that now has column x with %bql.
  5. Tried to create p for t modeling column x as nominal. This failed, saying t has no column x (even though now it does).
@riastradh-probcomp
Copy link
Contributor

Generally using %sql should be avoided. Better: Can you explain what you are trying to do in SQL that BQL can't do, so we can teach BQL to do it?

@curlette
Copy link
Contributor Author

curlette commented May 8, 2017

@riastradh-probcomp I think this was more of an issue of unexpected behavior when using %sql rather than %bql, but if we just tell users to not use %sql for anything %bql can do, then the onus is on them to not carelessly use %sql (like I guess I did by mistake).
@fsaad, thoughts?

@riastradh-probcomp
Copy link
Contributor

Not your fault if you were tempted to use %sql for something -- rather, a lazy omission in BQL. We should generally try to remove the temptations to use %sql; it's just sometimes not expedient in the moment.

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

No branches or pull requests

2 participants