sqlite: Expected integer, got something else #18
Comments
Is there a way to force debug output for |
Yes, sorry about that.
|
Yes - the Do we have the ability to print more troubleshooting info at the point the "Invalid Error" is detected?
|
PS I also wondered whether DuckDB had a regression - there were some hints in the duckdb repo's Issues. I changed Cargo.toml of the prql-query repo to retrieve 0.4.0, then rebuilt the Dockerfile.
|
@snth - any idea about how to start debugging this? What's special about columns declared to be INTEGER? Thanks. |
Hi, Sorry to have been leaving you hanging on this, I've had work and family things to attend to. I suspect that the duckdb-rs Rust wrapper for DuckDB might not have implemented the type mapping for those types. Therefore my plan is to first check whether these work fine in DuckDB and then check what's happening on the duckdb-rs side. I tried just opening those sqlite databases with the DuckDB CLI: That doesn't seem to work at all. sqlite itself seems to have no problem with the file: Maybe we need to file a bug report in the sqlite_scanner repo? Do you want to do that? |
@richb-hanover Do you have any other sqlite files that you can try the DuckDB CLI or pq on? |
Looks like there might be an issue for this already: duckdb/sqlite_scanner#7 |
Maybe - I'm not sure. I'm way beyond my depth, at least with my current understanding of the interrelationship between all the tools. I too have pressing other work, so my preference would be to document the error I'm seeing (can't read an integer from SQLite database) in the appropriate place and let those more familiar with the code find and fix the problem. What's the best way / best place to submit a report? (It looks as if your examples with the duckdb CLI are pretty compelling...) Thanks |
I don't understand how to do this. The screen shots above don't explain the commands to give (and what software needs to be installed prior to running them.) Thanks. |
I think don't worry about it for now. I initially thought I wouldn't be able to test it myself, but I was able to test it in the DuckDB CLI and it seems to point to the problem lying there. I'll track what's happening on that bug issue thread on their side and hopefully we can get a fix from them soon. |
Update: I know more than I used to...
|
New bug report filed in sqlite_scanner repo: duckdb/sqlite_scanner#15 |
Thanks for all your help with this @richb-hanover . I have created a new version of the chinook.sqlite file which shouldn't have those string headers in the numeric fields anymore. The sqlite3 version on my system (Ubuntu 20.04) is pretty old and didn't have the I hope this is enough your problems in the meantime. The example queries I tried worked now so I removed the WIP disclaimer from the SQLite section in the README. |
Thanks for the update. I am not using the Chinook database for any real work - only to test out some queries against a real database. But it's real useful to have a consistent database And as an "old software tester" when I run into an anomaly ("... got something else") I just had to run the test case to the ground. There's a perfectly reasonable explanation, so I'm content. I'm going to close this, since we now know what's happening. Thanks again. |
Ahah. I see the problem you cited. A database query for a field of type INTEGER gives an error, while a VARCHAR column works fine.
The following are
pq
commands against a copy of the chinook database in the local directory. pq was built withcargo build
(not using the Dockerfile).What other troubleshooting information could I provide? Thanks.
Working:
Not working:
The text was updated successfully, but these errors were encountered: