-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
Using session.query("insert xxx") will stuck #260
Labels
Notebook
Jupiter Notebook and others
Comments
Can't reproduce on my Linux. sess.query("INSERT INTO db_xxx.log_table_xxx VALUES ('a', 1), ('b', 3), ('c', 2), ('d', 5);", "Debug") and give me the log |
good in my environment root@localhost:~# python3
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from chdb import session as chs
>>>
>>> ## Create DB, Table, View in temp session, auto cleanup when session is deleted.
>>> sess = chs.Session()
>>> sess.query("CREATE DATABASE IF NOT EXISTS db_xxx ENGINE = Atomic")
>>> sess.query("CREATE TABLE IF NOT EXISTS db_xxx.log_table_xxx (x String, y Int) ENGINE = Log;")
>>> sess.query("INSERT INTO db_xxx.log_table_xxx VALUES ('a', 1), ('b', 3), ('c', 2), ('d', 5);")
>>> sess.query(
... "CREATE VIEW db_xxx.view_xxx AS SELECT * FROM db_xxx.log_table_xxx LIMIT 4;"
... )
>>> print("Select from view:\n")
Select from view:
>>> print(sess.query("SELECT * FROM db_xxx.view_xxx", "Pretty"))
┏━━━┳━━━┓
┃ x ┃ y ┃
┡━━━╇━━━┩
1. │ a │ 1 │
├───┼───┤
2. │ b │ 3 │
├───┼───┤
3. │ c │ 2 │
├───┼───┤
4. │ d │ 5 │
└───┴───┘ |
Oh, I see. It's a known issue #152 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(you don't have to strictly follow this form)
Describe the situation
What exactly works slower than expected?
How to reproduce
code from: https://github.com/chdb-io/chdb/blob/main/tests/test_stateful.py
Expected performance
This code should work but it stucked on
sess.query("INSERT INTO db_xxx.log_table_xxx VALUES ('a', 1), ('b', 3), ('c', 2), ('d', 5);")
Additional context
uname -a
shows:The text was updated successfully, but these errors were encountered: