Why is my JOIN failing for Virtual Tables

21 views
Skip to first unread message

Farid Zakaria

unread,
Mar 12, 2023, 11:20:06 AM3/12/23
to python-sqlite
Hi!

I am using the excellent make_virtual_module to make some Virtual Tables.
It seems to work very nicely for single tables but now I am trying to support JOIN of multiple tables.

apsw or sqlite is giving me very confusing errors:

sqlite> SELECT elf_headers.path, COUNT(*)
    ..> FROM elf_headers
    ..> INNER JOIN elf_sections ON elf_headers.path = elf_sections.path
    ..> GROUP BY elf_headers.path;
ERROR:root:SQLITE_LOG: statement aborts at 14: [SELECT elf_headers.path, COUNT(*)
FROM elf_headers
INNER JOIN elf_sections ON elf_headers.path = elf_sections.path
GROUP BY elf_headers.path;]  (1) SQLITE_ERROR
'list' object has no attribute 'update'


I've tried a few different combinations of the SQL.
Interestingly, if I remove the GROUP BY (and COUNT) then I can get some results of the JOIN but I still see the ERROR at the end.

Thank you to all who may respond.

Farid Zakaria

unread,
Mar 12, 2023, 11:27:04 AM3/12/23
to python...@googlegroups.com
I filled https://github.com/rogerbinns/apsw/issues/412 for those that are interested.
It includes the detailed stack trace and some more information.

Farid Zakaria



--

---
You received this message because you are subscribed to a topic in the Google Groups "python-sqlite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python-sqlite/pkK3_9Ht7GA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python-sqlit...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python-sqlite/1ef0c2be-0722-4751-b52a-148ee399a8ffn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages