v3.3.0
What's Changed
- Fix signal loss by removing the signal handler in the ClickHouse engine by @wudidapaopao in #327
- Add README documentation for JSON type support and new interface by @wudidapaopao in #335
- Add storage_rows_read and storage_bytes_read interfaces for retrieving storage metrics by @wudidapaopao in #334
- Implement JSON type support by @wudidapaopao in #330
import chdb
import pandas as pd
dict_data = {
"a": [1, 2, 3, 4, 5, 6],
"b": ["tom", "jerry", "auxten", "tom", "jerry", "auxten"],
"dict_col": [
{'id': 1, 'tags': ['urgent', 'important'],
'metadata': {'created': '2024-01-01'}},
{'id': 2, 'tags': ['normal'],
'metadata': {'created': '2024-02-01'}},
{'id': 3, 'name': 'tom'},
{'id': 4, 'value': '100'},
{'id': 5, 'value': 101},
{'id': 6, 'value': 102},
],
}
df = pd.DataFrame(dict_data)
chdb.query("SELECT b, sum(a) FROM Python(df) GROUP BY b ORDER BY b").show()
# "auxten",9
# "jerry",7
# "tom",5
chdb.query(
"SELECT dict_col.id FROM Python(dict_data) WHERE dict_col.value='100'"
).show()
# 4
Full Changelog: v3.2.0...v3.3.0