chdb 3.6.0__cp38-abi3-macosx_11_0_arm64.whl → 3.7.0__cp38-abi3-macosx_11_0_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of chdb might be problematic. Click here for more details.
- chdb/.flake8 +5 -0
- chdb/__init__.py +132 -11
- chdb/_chdb.abi3.so +0 -0
- chdb/build-musl.sh +166 -0
- chdb/build.sh +370 -0
- chdb/build_linux_arm64.sh +63 -0
- chdb/build_mac_arm64.sh +121 -0
- chdb/build_pybind11.sh +131 -0
- chdb/dataframe/__init__.py +7 -2
- chdb/dataframe/query.py +211 -23
- chdb/dbapi/__init__.py +57 -2
- chdb/dbapi/connections.py +169 -12
- chdb/dbapi/converters.py +352 -34
- chdb/dbapi/cursors.py +264 -70
- chdb/dbapi/err.py +269 -30
- chdb/dbapi/times.py +171 -0
- chdb/libpybind11nonlimitedapi_chdb_3.10.dylib +0 -0
- chdb/libpybind11nonlimitedapi_chdb_3.11.dylib +0 -0
- chdb/libpybind11nonlimitedapi_chdb_3.12.dylib +0 -0
- chdb/libpybind11nonlimitedapi_chdb_3.13.dylib +0 -0
- chdb/libpybind11nonlimitedapi_chdb_3.8.dylib +0 -0
- chdb/libpybind11nonlimitedapi_chdb_3.9.dylib +0 -0
- chdb/libpybind11nonlimitedapi_stubs.dylib +0 -0
- chdb/session/state.py +167 -4
- chdb/state/sqlitelike.py +608 -34
- chdb/test_smoke.sh +32 -0
- chdb/udf/__init__.py +7 -0
- chdb/udf/udf.py +41 -25
- chdb/utils/__init__.py +6 -0
- chdb/utils/trace.py +31 -0
- chdb/utils/types.py +62 -64
- chdb/vars.sh +48 -0
- {chdb-3.6.0.dist-info → chdb-3.7.0.dist-info}/METADATA +29 -18
- chdb-3.7.0.dist-info/RECORD +43 -0
- chdb-3.6.0.dist-info/RECORD +0 -35
- {chdb-3.6.0.dist-info → chdb-3.7.0.dist-info}/LICENSE.txt +0 -0
- {chdb-3.6.0.dist-info → chdb-3.7.0.dist-info}/WHEEL +0 -0
- {chdb-3.6.0.dist-info → chdb-3.7.0.dist-info}/top_level.txt +0 -0
chdb/test_smoke.sh
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
6
|
+
|
|
7
|
+
. ${DIR}/vars.sh
|
|
8
|
+
|
|
9
|
+
# test the pybind module
|
|
10
|
+
cd ${CHDB_DIR}
|
|
11
|
+
|
|
12
|
+
python3 -c \
|
|
13
|
+
"import _chdb; res = _chdb.query('select 1112222222,555', 'JSON'); print(res)"
|
|
14
|
+
|
|
15
|
+
python3 -c \
|
|
16
|
+
"import _chdb; res = _chdb.query('select 1112222222,555', 'Arrow'); print(res.bytes())"
|
|
17
|
+
|
|
18
|
+
# test the python wrapped module
|
|
19
|
+
cd ${PROJ_DIR}
|
|
20
|
+
|
|
21
|
+
python3 -c \
|
|
22
|
+
"import chdb; res = chdb._chdb.query('select version()', 'CSV'); print(res)"
|
|
23
|
+
|
|
24
|
+
python3 -c \
|
|
25
|
+
"import chdb; res = chdb.query('select version()', 'Debug'); print(res.bytes())"
|
|
26
|
+
|
|
27
|
+
# test json function
|
|
28
|
+
python3 -c \
|
|
29
|
+
"import chdb; res = chdb.query('select isValidJSON(\'not a json\')', 'CSV'); print(res)"
|
|
30
|
+
|
|
31
|
+
# test cli
|
|
32
|
+
python3 -m chdb "select 1112222222,555" Dataframe
|
chdb/udf/__init__.py
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
"""User-defined functions module for chDB.
|
|
2
|
+
|
|
3
|
+
This module provides functionality for creating and managing user-defined functions (UDFs)
|
|
4
|
+
in chDB. It allows you to extend chDB's capabilities by writing custom Python functions
|
|
5
|
+
that can be called from SQL queries.
|
|
6
|
+
"""
|
|
7
|
+
|
|
1
8
|
from .udf import chdb_udf, generate_udf
|
|
2
9
|
|
|
3
10
|
__all__ = ["chdb_udf", "generate_udf"]
|
chdb/udf/udf.py
CHANGED
|
@@ -11,6 +11,22 @@ import chdb
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
def generate_udf(func_name, args, return_type, udf_body):
|
|
14
|
+
"""Generate UDF configuration and executable script files.
|
|
15
|
+
|
|
16
|
+
This function creates the necessary files for a User Defined Function (UDF) in chDB:
|
|
17
|
+
1. A Python executable script that processes input data
|
|
18
|
+
2. An XML configuration file that registers the UDF with ClickHouse
|
|
19
|
+
|
|
20
|
+
Args:
|
|
21
|
+
func_name (str): Name of the UDF function
|
|
22
|
+
args (list): List of argument names for the function
|
|
23
|
+
return_type (str): ClickHouse return type for the function
|
|
24
|
+
udf_body (str): Python source code body of the UDF function
|
|
25
|
+
|
|
26
|
+
Note:
|
|
27
|
+
This function is typically called by the @chdb_udf decorator and should not
|
|
28
|
+
be called directly by users.
|
|
29
|
+
"""
|
|
14
30
|
# generate python script
|
|
15
31
|
with open(f"{chdb.g_udf_path}/{func_name}.py", "w") as f:
|
|
16
32
|
f.write(f"#!{sys.executable}\n")
|
|
@@ -49,31 +65,31 @@ def generate_udf(func_name, args, return_type, udf_body):
|
|
|
49
65
|
|
|
50
66
|
|
|
51
67
|
def chdb_udf(return_type="String"):
|
|
52
|
-
"""
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
68
|
+
"""Decorator for chDB Python UDF(User Defined Function).
|
|
69
|
+
|
|
70
|
+
Args:
|
|
71
|
+
return_type (str): Return type of the function. Default is "String".
|
|
72
|
+
Should be one of the ClickHouse data types.
|
|
73
|
+
|
|
74
|
+
Notes:
|
|
75
|
+
1. The function should be stateless. Only UDFs are supported, not UDAFs.
|
|
76
|
+
2. Default return type is String. The return type should be one of the ClickHouse data types.
|
|
77
|
+
3. The function should take in arguments of type String. All arguments are strings.
|
|
78
|
+
4. The function will be called for each line of input.
|
|
79
|
+
5. The function should be pure python function. Import all modules used IN THE FUNCTION.
|
|
80
|
+
6. Python interpreter used is the same as the one used to run the script.
|
|
81
|
+
|
|
82
|
+
Example:
|
|
83
|
+
.. code-block:: python
|
|
84
|
+
|
|
85
|
+
@chdb_udf()
|
|
86
|
+
def sum_udf(lhs, rhs):
|
|
87
|
+
return int(lhs) + int(rhs)
|
|
88
|
+
|
|
89
|
+
@chdb_udf()
|
|
90
|
+
def func_use_json(arg):
|
|
91
|
+
import json
|
|
92
|
+
# ... use json module
|
|
77
93
|
"""
|
|
78
94
|
|
|
79
95
|
def decorator(func):
|
chdb/utils/__init__.py
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
"""Utility functions and helpers for chDB.
|
|
2
|
+
|
|
3
|
+
This module contains various utility functions for working with chDB, including
|
|
4
|
+
data type inference, data conversion helpers, and debugging utilities.
|
|
5
|
+
"""
|
|
6
|
+
|
|
1
7
|
from .types import * # noqa: F403
|
|
2
8
|
|
|
3
9
|
__all__ = [ # noqa: F405
|
chdb/utils/trace.py
CHANGED
|
@@ -7,6 +7,37 @@ from datetime import datetime
|
|
|
7
7
|
enable_print = False
|
|
8
8
|
|
|
9
9
|
|
|
10
|
+
def trace(func):
|
|
11
|
+
"""Trace function execution with line-by-line debugging information.
|
|
12
|
+
|
|
13
|
+
This decorator enables line-by-line tracing of function execution, printing
|
|
14
|
+
each executed line along with local variable values. Tracing is only enabled
|
|
15
|
+
when the global `enable_print` variable is True.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
func: The function to be traced
|
|
19
|
+
|
|
20
|
+
Returns:
|
|
21
|
+
The wrapped function with tracing capabilities
|
|
22
|
+
|
|
23
|
+
Note:
|
|
24
|
+
Set `enable_print = True` to enable tracing output. When disabled,
|
|
25
|
+
the function executes normally without any performance overhead.
|
|
26
|
+
|
|
27
|
+
Example:
|
|
28
|
+
.. code-block:: python
|
|
29
|
+
|
|
30
|
+
import chdb.utils.trace
|
|
31
|
+
chdb.utils.trace.enable_print = True
|
|
32
|
+
|
|
33
|
+
@chdb.utils.trace.trace
|
|
34
|
+
def my_function(x, y):
|
|
35
|
+
z = x + y
|
|
36
|
+
return z * 2
|
|
37
|
+
"""
|
|
38
|
+
return print_lines(func)
|
|
39
|
+
|
|
40
|
+
|
|
10
41
|
def print_lines(func):
|
|
11
42
|
if not enable_print:
|
|
12
43
|
return func
|
chdb/utils/types.py
CHANGED
|
@@ -5,32 +5,31 @@ import decimal
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
def convert_to_columnar(items: List[Dict[str, Any]]) -> Dict[str, List[Any]]:
|
|
8
|
-
"""
|
|
9
|
-
Converts a list of dictionaries into a columnar format.
|
|
8
|
+
"""Converts a list of dictionaries into a columnar format.
|
|
10
9
|
|
|
11
10
|
This function takes a list of dictionaries and converts it into a dictionary
|
|
12
11
|
where each key corresponds to a column and each value is a list of column values.
|
|
13
12
|
Missing values in the dictionaries are represented as None.
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
Args:
|
|
15
|
+
items (List[Dict[str, Any]]): A list of dictionaries to convert.
|
|
17
16
|
|
|
18
17
|
Returns:
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
Dict[str, List[Any]]: A dictionary with keys as column names and values as lists
|
|
19
|
+
of column values.
|
|
21
20
|
|
|
22
21
|
Example:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
>>> items = [
|
|
23
|
+
... {"name": "Alice", "age": 30, "city": "New York"},
|
|
24
|
+
... {"name": "Bob", "age": 25},
|
|
25
|
+
... {"name": "Charlie", "city": "San Francisco"}
|
|
26
|
+
... ]
|
|
27
|
+
>>> convert_to_columnar(items)
|
|
28
|
+
{
|
|
29
|
+
'name': ['Alice', 'Bob', 'Charlie'],
|
|
30
|
+
'age': [30, 25, None],
|
|
31
|
+
'city': ['New York', None, 'San Francisco']
|
|
32
|
+
}
|
|
34
33
|
"""
|
|
35
34
|
if not items:
|
|
36
35
|
return {}
|
|
@@ -54,42 +53,41 @@ def convert_to_columnar(items: List[Dict[str, Any]]) -> Dict[str, List[Any]]:
|
|
|
54
53
|
def flatten_dict(
|
|
55
54
|
d: Dict[str, Any], parent_key: str = "", sep: str = "_"
|
|
56
55
|
) -> Dict[str, Any]:
|
|
57
|
-
"""
|
|
58
|
-
Flattens a nested dictionary.
|
|
56
|
+
"""Flattens a nested dictionary.
|
|
59
57
|
|
|
60
58
|
This function takes a nested dictionary and flattens it, concatenating nested keys
|
|
61
59
|
with a separator. Lists of dictionaries are serialized to JSON strings.
|
|
62
60
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
61
|
+
Args:
|
|
62
|
+
d (Dict[str, Any]): The dictionary to flatten.
|
|
63
|
+
parent_key (str, optional): The base key to prepend to each key. Defaults to "".
|
|
64
|
+
sep (str, optional): The separator to use between concatenated keys. Defaults to "_".
|
|
67
65
|
|
|
68
66
|
Returns:
|
|
69
|
-
|
|
67
|
+
Dict[str, Any]: A flattened dictionary.
|
|
70
68
|
|
|
71
69
|
Example:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
70
|
+
>>> nested_dict = {
|
|
71
|
+
... "a": 1,
|
|
72
|
+
... "b": {
|
|
73
|
+
... "c": 2,
|
|
74
|
+
... "d": {
|
|
75
|
+
... "e": 3
|
|
76
|
+
... }
|
|
77
|
+
... },
|
|
78
|
+
... "f": [4, 5, {"g": 6}],
|
|
79
|
+
... "h": [{"i": 7}, {"j": 8}]
|
|
80
|
+
... }
|
|
81
|
+
>>> flatten_dict(nested_dict)
|
|
82
|
+
{
|
|
83
|
+
'a': 1,
|
|
84
|
+
'b_c': 2,
|
|
85
|
+
'b_d_e': 3,
|
|
86
|
+
'f_0': 4,
|
|
87
|
+
'f_1': 5,
|
|
88
|
+
'f_2_g': 6,
|
|
89
|
+
'h': '[{"i": 7}, {"j": 8}]'
|
|
90
|
+
}
|
|
93
91
|
"""
|
|
94
92
|
items = []
|
|
95
93
|
for k, v in d.items():
|
|
@@ -115,19 +113,20 @@ def flatten_dict(
|
|
|
115
113
|
def infer_data_types(
|
|
116
114
|
column_data: Dict[str, List[Any]], n_rows: int = 10000
|
|
117
115
|
) -> List[tuple]:
|
|
118
|
-
"""
|
|
119
|
-
Infers data types for each column in a columnar data structure.
|
|
116
|
+
"""Infers data types for each column in a columnar data structure.
|
|
120
117
|
|
|
121
118
|
This function analyzes the values in each column and infers the most suitable
|
|
122
119
|
data type for each column, based on a sample of the data.
|
|
123
120
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
121
|
+
Args:
|
|
122
|
+
column_data (Dict[str, List[Any]]): A dictionary where keys are column names
|
|
123
|
+
and values are lists of column values.
|
|
124
|
+
n_rows (int, optional): The number of rows to sample for type inference.
|
|
125
|
+
Defaults to 10000.
|
|
128
126
|
|
|
129
127
|
Returns:
|
|
130
|
-
|
|
128
|
+
List[tuple]: A list of tuples, each containing a column name and its
|
|
129
|
+
inferred data type.
|
|
131
130
|
"""
|
|
132
131
|
data_types = []
|
|
133
132
|
for column, values in column_data.items():
|
|
@@ -138,28 +137,27 @@ def infer_data_types(
|
|
|
138
137
|
|
|
139
138
|
|
|
140
139
|
def infer_data_type(values: List[Any]) -> str:
|
|
141
|
-
"""
|
|
142
|
-
Infers the most suitable data type for a list of values.
|
|
140
|
+
"""Infers the most suitable data type for a list of values.
|
|
143
141
|
|
|
144
142
|
This function examines a list of values and determines the most appropriate
|
|
145
143
|
data type that can represent all the values in the list. It considers integer,
|
|
146
144
|
unsigned integer, decimal, and float types, and defaults to "string" if the
|
|
147
145
|
values cannot be represented by any numeric type or if all values are None.
|
|
148
146
|
|
|
149
|
-
|
|
150
|
-
|
|
147
|
+
Args:
|
|
148
|
+
values (List[Any]): A list of values to analyze. The values can be of any type.
|
|
151
149
|
|
|
152
150
|
Returns:
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
151
|
+
str: A string representing the inferred data type. Possible return values are:
|
|
152
|
+
"int8", "int16", "int32", "int64", "int128", "int256", "uint8", "uint16",
|
|
153
|
+
"uint32", "uint64", "uint128", "uint256", "decimal128", "decimal256",
|
|
154
|
+
"float32", "float64", or "string".
|
|
157
155
|
|
|
158
156
|
Notes:
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
157
|
+
- If all values in the list are None, the function returns "string".
|
|
158
|
+
- If any value in the list is a string, the function immediately returns "string".
|
|
159
|
+
- The function assumes that numeric values can be represented as integers,
|
|
160
|
+
decimals, or floats based on their range and precision.
|
|
163
161
|
"""
|
|
164
162
|
|
|
165
163
|
int_range = {
|
chdb/vars.sh
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# get the directory of the script
|
|
2
|
+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
3
|
+
PROJ_DIR="${DIR}/.." # project root directory
|
|
4
|
+
BUILD_DIR="$PROJ_DIR/buildlib" # build directory
|
|
5
|
+
CHDB_DIR="$PROJ_DIR/chdb" # chdb directory
|
|
6
|
+
CHDB_PY_MOD="_chdb"
|
|
7
|
+
CHDB_PY_MODULE="${CHDB_PY_MOD}.abi3.so"
|
|
8
|
+
pushd ${PROJ_DIR}
|
|
9
|
+
CHDB_VERSION=$(python3 -c 'import setup; print(setup.get_latest_git_tag())')
|
|
10
|
+
popd
|
|
11
|
+
|
|
12
|
+
# try to use largest llvm-strip version
|
|
13
|
+
# if none of them are found, use llvm-strip or strip
|
|
14
|
+
if [ -z "$STRIP" ]; then
|
|
15
|
+
STRIP=$(ls -1 /usr/bin/llvm-strip* | sort -V | tail -n 1)
|
|
16
|
+
fi
|
|
17
|
+
if [ -z "$STRIP" ]; then
|
|
18
|
+
STRIP=$(ls -1 /usr/local/bin/llvm-strip* | sort -V | tail -n 1)
|
|
19
|
+
fi
|
|
20
|
+
# on macOS
|
|
21
|
+
if [ -z "$STRIP" ]; then
|
|
22
|
+
STRIP=$(ls -1 /usr/local/Cellar/llvm/*/bin/llvm-strip* | sort -V | tail -n 1)
|
|
23
|
+
fi
|
|
24
|
+
if [ -z "$STRIP" ]; then
|
|
25
|
+
STRIP=$(ls -1 /usr/local/opt/llvm/bin/llvm-strip* | sort -V | tail -n 1)
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
# if none of them are found, use llvm-strip or strip
|
|
29
|
+
if [ -z "$STRIP" ]; then
|
|
30
|
+
STRIP=$(which llvm-strip)
|
|
31
|
+
fi
|
|
32
|
+
if [ -z "$STRIP" ]; then
|
|
33
|
+
STRIP=$(which strip)
|
|
34
|
+
fi
|
|
35
|
+
|
|
36
|
+
# check current os type, and make ldd command
|
|
37
|
+
if [ "$(uname)" == "Darwin" ]; then
|
|
38
|
+
LDD="otool -L"
|
|
39
|
+
AR="llvm-ar"
|
|
40
|
+
NM="llvm-nm"
|
|
41
|
+
elif [ "$(uname)" == "Linux" ]; then
|
|
42
|
+
LDD="ldd"
|
|
43
|
+
AR="ar"
|
|
44
|
+
NM="nm"
|
|
45
|
+
else
|
|
46
|
+
echo "OS not supported"
|
|
47
|
+
exit 1
|
|
48
|
+
fi
|
|
@@ -1,35 +1,50 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: chdb
|
|
3
|
-
Version: 3.
|
|
4
|
-
Summary: chDB is an in-process SQL
|
|
3
|
+
Version: 3.7.0
|
|
4
|
+
Summary: chDB is an in-process OLAP SQL Engine powered by ClickHouse
|
|
5
5
|
Home-page: https://github.com/chdb-io/chdb
|
|
6
6
|
Author: auxten
|
|
7
|
-
Author-email: auxten@clickhouse.com
|
|
7
|
+
Author-email: chDB Team <auxten@clickhouse.com>
|
|
8
8
|
License: Apache-2.0
|
|
9
9
|
Project-URL: Homepage, https://clickhouse.com/chdb
|
|
10
|
-
Project-URL: Documentation, https://
|
|
11
|
-
Project-URL:
|
|
12
|
-
Project-URL:
|
|
13
|
-
Project-URL:
|
|
10
|
+
Project-URL: Documentation, https://chdb.readthedocs.io/en/latest/index.html
|
|
11
|
+
Project-URL: Repository, https://github.com/chdb-io/chdb
|
|
12
|
+
Project-URL: Changelog, https://github.com/chdb-io/chdb/releases
|
|
13
|
+
Project-URL: Issues, https://github.com/chdb-io/chdb/issues
|
|
14
|
+
Keywords: chdb,clickhouse,olap,analytics,database,sql
|
|
14
15
|
Platform: Mac
|
|
15
16
|
Platform: Linux
|
|
16
|
-
Classifier: Development Status ::
|
|
17
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
18
|
+
Classifier: Environment :: Plugins
|
|
17
19
|
Classifier: Intended Audience :: Developers
|
|
18
20
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
19
21
|
Classifier: Operating System :: MacOS :: MacOS X
|
|
20
|
-
Classifier: Operating System :: POSIX
|
|
22
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
23
|
+
Classifier: Programming Language :: Python :: 3
|
|
21
24
|
Classifier: Programming Language :: Python :: 3.8
|
|
22
25
|
Classifier: Programming Language :: Python :: 3.9
|
|
23
26
|
Classifier: Programming Language :: Python :: 3.10
|
|
24
27
|
Classifier: Programming Language :: Python :: 3.11
|
|
25
28
|
Classifier: Programming Language :: Python :: 3.12
|
|
29
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
30
|
+
Classifier: Programming Language :: C++
|
|
31
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
26
32
|
Classifier: Topic :: Database
|
|
27
|
-
Classifier: Topic :: Scientific/Engineering
|
|
33
|
+
Classifier: Topic :: Scientific/Engineering
|
|
28
34
|
Requires-Python: >=3.8
|
|
29
|
-
Description-Content-Type: text/markdown
|
|
35
|
+
Description-Content-Type: text/markdown
|
|
30
36
|
License-File: LICENSE.txt
|
|
31
|
-
|
|
32
|
-
Requires-Dist:
|
|
37
|
+
Provides-Extra: ci
|
|
38
|
+
Requires-Dist: cibuildwheel; extra == "ci"
|
|
39
|
+
Provides-Extra: dataframe
|
|
40
|
+
Requires-Dist: pandas>=2.0.0; extra == "dataframe"
|
|
41
|
+
Requires-Dist: pyarrow>=13.0.0; extra == "dataframe"
|
|
42
|
+
Provides-Extra: dev
|
|
43
|
+
Requires-Dist: pytest; extra == "dev"
|
|
44
|
+
Requires-Dist: pytest-cov; extra == "dev"
|
|
45
|
+
Provides-Extra: publish
|
|
46
|
+
Requires-Dist: twine; extra == "publish"
|
|
47
|
+
Requires-Dist: wheel; extra == "publish"
|
|
33
48
|
|
|
34
49
|
<div align="center">
|
|
35
50
|
<a href="https://clickhouse.com/blog/chdb-joins-clickhouse-family">📢 chDB joins the ClickHouse family 🐍+🚀</a>
|
|
@@ -449,11 +464,7 @@ chDB automatically converts Python dictionary objects to ClickHouse JSON types f
|
|
|
449
464
|
```
|
|
450
465
|
- Columns are converted to `String` if sampling finds non-dictionary values.
|
|
451
466
|
|
|
452
|
-
2. **
|
|
453
|
-
- `struct` type columns are automatically mapped to JSON columns.
|
|
454
|
-
- Nested structures preserve type information.
|
|
455
|
-
|
|
456
|
-
3. **chdb.PyReader**
|
|
467
|
+
2. **chdb.PyReader**
|
|
457
468
|
- Implement custom schema mapping in `get_schema()`:
|
|
458
469
|
```python
|
|
459
470
|
def get_schema(self):
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
chdb/.flake8,sha256=xjK5O_FAFxfSiVWT53FduODB3prb19ULv1HF82UYQfw,73
|
|
2
|
+
chdb/__init__.py,sha256=NDyT2rzFyT3iGNIA80nbbu3jgUC4FFPEMcjJHP4E4eA,8120
|
|
3
|
+
chdb/__main__.py,sha256=vl-gorTYCT9Uh_h4jbQ8O-a5_pokCJPFbF_yplIgKYc,1336
|
|
4
|
+
chdb/_chdb.abi3.so,sha256=eoeVlPzLnt3TLzTEQBpfjjLU4mXBLWFshwrHg-DPqhs,324258016
|
|
5
|
+
chdb/build-musl.sh,sha256=OeaHanKKJYXdt8av0sqQQlFHb-bamgAhCHnIrZKI_4E,6390
|
|
6
|
+
chdb/build.sh,sha256=UiQPtt5y3RhbsfF1Xgr4hKCgbRxIIE04qt3CJTj2OZU,15761
|
|
7
|
+
chdb/build_linux_arm64.sh,sha256=YgA1AaE_61eshUJ0ec5o2YQS-fno1jc7dyhPLdi-OoE,1835
|
|
8
|
+
chdb/build_mac_arm64.sh,sha256=oM9O0ufRCug8BMChFi-dcGJlIUXOufCBAH_NimwQAGo,4391
|
|
9
|
+
chdb/build_pybind11.sh,sha256=3OLn3hubvpnA-zPiwYrN9nsRmqPA1oJba2Tb8Kjp6RI,4023
|
|
10
|
+
chdb/libpybind11nonlimitedapi_chdb_3.10.dylib,sha256=ft2vPqMfj8zPZHEQx5tqfVVK54eUWJA8zwKKlHvylHs,337912
|
|
11
|
+
chdb/libpybind11nonlimitedapi_chdb_3.11.dylib,sha256=0_CGIuVqdKBmjLIGUniZzBPDsMJWEChT-WUQItjz3E8,354600
|
|
12
|
+
chdb/libpybind11nonlimitedapi_chdb_3.12.dylib,sha256=KWU-_-basEz91I-BzwADd4Ooou-_saMT1dTNmqRtVhw,355304
|
|
13
|
+
chdb/libpybind11nonlimitedapi_chdb_3.13.dylib,sha256=3CWu5gCABHiK2bAbtDGKcJcN4SCN_rv0356fM_FwSJo,355512
|
|
14
|
+
chdb/libpybind11nonlimitedapi_chdb_3.8.dylib,sha256=qY7UfzH-0T7qJMhtX8a-3cKpMmV5KO_FhawyXMJAi8w,337544
|
|
15
|
+
chdb/libpybind11nonlimitedapi_chdb_3.9.dylib,sha256=fAA4Fq2LmHErMPOOlylaSynTX6XL-Tc2ytvgbZVrweQ,338408
|
|
16
|
+
chdb/libpybind11nonlimitedapi_stubs.dylib,sha256=0jKGBpa8OLNhJZBymobC6owxnxbkzDbtmmhbWX-9pdY,460136
|
|
17
|
+
chdb/rwabc.py,sha256=tbiwCrXirfrfx46wCJxS64yvFe6pVWIPGdSuvrAL5Ys,2102
|
|
18
|
+
chdb/test_smoke.sh,sha256=Ft6tB7jZ4g9uXo7wghU0B9q88ajIBiLRr-oMNQfyft4,788
|
|
19
|
+
chdb/vars.sh,sha256=HIHUCtInWr0p1SbNYLxsdXSC0Q6eDnd1p4n4_TJuvqo,1333
|
|
20
|
+
chdb/dataframe/__init__.py,sha256=5UJvqfo8V6nyvATEoyfqkmZZDsELuI1GzW7whityhMQ,833
|
|
21
|
+
chdb/dataframe/query.py,sha256=ZMAVavv5O4p6miYntCHLOiCUwEPsSMpeW8uq0UyhRPs,20490
|
|
22
|
+
chdb/dbapi/__init__.py,sha256=bLViIz4o4n6DUezmhK82k8DkQZPGZ29HN_CsSnBtYM4,4066
|
|
23
|
+
chdb/dbapi/connections.py,sha256=vDmbP1eal7cxzJofGOWUhVWYbHqmDHJ9yjFwCDkd9Zk,7766
|
|
24
|
+
chdb/dbapi/converters.py,sha256=wNNhqQ0M9ETbRjk0NsskN_dvOyA39aO_Jd5gbzzMOrg,16687
|
|
25
|
+
chdb/dbapi/cursors.py,sha256=vOIdPkUw6seBg-HKXPwd8gha-KUKn_zO7DD6HKVhnZA,18955
|
|
26
|
+
chdb/dbapi/err.py,sha256=Xd8rU4BoJIw-kA-Lq1z1Yemke9KZrK0fN5tRD44rXJM,10952
|
|
27
|
+
chdb/dbapi/times.py,sha256=85W_V8RdEGikDAJCry0-zTgptlvQqacCaWk9fcdo-0Q,6387
|
|
28
|
+
chdb/dbapi/constants/FIELD_TYPE.py,sha256=ytFzgAnGmb9hvdsBlnK68qdZv_a6jYFIXT6VSAb60z8,370
|
|
29
|
+
chdb/dbapi/constants/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
30
|
+
chdb/session/__init__.py,sha256=fCUROZ5L1-92o2lcASiWJpFu-80-kDoSrNfouLEmLg8,50
|
|
31
|
+
chdb/session/state.py,sha256=23dKfiSFDrbKOu4xD-kp8KdqK5BMEqit3U0DKfdHvco,11299
|
|
32
|
+
chdb/state/__init__.py,sha256=RVUIWDqDi7gte4Os7Mz1wPXFyFpdHT_p1klJC7QtluI,55
|
|
33
|
+
chdb/state/sqlitelike.py,sha256=tB3Jcyvo13dikluNzVK1InmuDNljI9LACsDbydPqgf4,39594
|
|
34
|
+
chdb/udf/__init__.py,sha256=u6GnDupve5_0H7h6_cC4NJa4uz_Gk7-YyYXCFPHBrgY,345
|
|
35
|
+
chdb/udf/udf.py,sha256=ysqvWb2Pw3AEWWj80ag4gmjtAgA1ZuD3K9GvJZkqWFo,4408
|
|
36
|
+
chdb/utils/__init__.py,sha256=vqAdb3aXCRsT4EB1TTmjUS79p5TzuZBVAIzMHclDfwk,371
|
|
37
|
+
chdb/utils/trace.py,sha256=PoE_L7Rc2RuGfoOGKk55WB4HxS3ZWGqJRrSSOwQmYgQ,3392
|
|
38
|
+
chdb/utils/types.py,sha256=QY5Hp0uaRwbToCzgBw6BisEJcS6zEhGU3QpFUQ9bORs,7706
|
|
39
|
+
chdb-3.7.0.dist-info/LICENSE.txt,sha256=isYVtNCO5910aj6e9bJJ6kQceivkLqsMlFSNYwzGGKI,11366
|
|
40
|
+
chdb-3.7.0.dist-info/METADATA,sha256=qxHkW6Tv48asIBB9avlV-yYycQB05J5tL0XHe0nRLDg,26206
|
|
41
|
+
chdb-3.7.0.dist-info/WHEEL,sha256=GqzCFbmUcDe_JjHZ0zYl7w7wj8C0Iq37-tkp4yKFDsU,107
|
|
42
|
+
chdb-3.7.0.dist-info/top_level.txt,sha256=se0Jj0A2-ijfMW51hIjiuNyDJPqy5xJU1G8a_IEdllI,11
|
|
43
|
+
chdb-3.7.0.dist-info/RECORD,,
|
chdb-3.6.0.dist-info/RECORD
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
chdb/__init__.py,sha256=Wn5pgJ95tX05ILVnRAXbek_ucF7ZHZ40h3eH6HPDbDY,3762
|
|
2
|
-
chdb/__main__.py,sha256=vl-gorTYCT9Uh_h4jbQ8O-a5_pokCJPFbF_yplIgKYc,1336
|
|
3
|
-
chdb/_chdb.abi3.so,sha256=NYAg8YYV68HIoEfss9J4txrJLpGY5RalsaeN8wK3KyM,383354256
|
|
4
|
-
chdb/libpybind11nonlimitedapi_chdb_3.10.dylib,sha256=cIpBl61ccFLZyXW9Bd8pKUmL7-U6cLOt2MM8-Xiqcnk,337928
|
|
5
|
-
chdb/libpybind11nonlimitedapi_chdb_3.11.dylib,sha256=rodpN1O5AIxGTYvceSZEPJw8XMsq9hbitKt5aVoTs0g,338008
|
|
6
|
-
chdb/libpybind11nonlimitedapi_chdb_3.12.dylib,sha256=gi5Sz4yw6xBpeT_uKS52BdJQkG_wmXw7QFFQJ0ypw00,338696
|
|
7
|
-
chdb/libpybind11nonlimitedapi_chdb_3.13.dylib,sha256=yz7QllWE3-u0WEfpMQi1hQ4fSdLltgTpCaWL4dEUyek,338904
|
|
8
|
-
chdb/libpybind11nonlimitedapi_chdb_3.8.dylib,sha256=Mb4iung_CCeXfj2ujtFuI1_0w99S3-gF7UWiJxQDvUc,337560
|
|
9
|
-
chdb/libpybind11nonlimitedapi_chdb_3.9.dylib,sha256=Htxz7qmZ3kH1cnq4o6QpFx_g86sbrHuHWrr4ESaqNyQ,338424
|
|
10
|
-
chdb/libpybind11nonlimitedapi_stubs.dylib,sha256=X-bRBCanW9sTvA4tiilqoUjEw5UFneqGMxiNjNQ8E2Y,443608
|
|
11
|
-
chdb/rwabc.py,sha256=tbiwCrXirfrfx46wCJxS64yvFe6pVWIPGdSuvrAL5Ys,2102
|
|
12
|
-
chdb/dataframe/__init__.py,sha256=1_mrZZiJwqBTnH_P8_FCbbYXIWWY5sxnaFpe3-tDLF4,680
|
|
13
|
-
chdb/dataframe/query.py,sha256=ggvE8A5vtabFg9gSTp99S7LCrnIEwbWtb-PtJVT8Ct0,12759
|
|
14
|
-
chdb/dbapi/__init__.py,sha256=aaNhxXNBC1ZkFr260cbGR8msOinTp0VoNTT_j8AXGUc,2205
|
|
15
|
-
chdb/dbapi/connections.py,sha256=RW0EcusyKueMGp7VmSaCO-ukyzY7l2ps_ibA9-pXDvo,2754
|
|
16
|
-
chdb/dbapi/converters.py,sha256=0SDqgixUTCz0LtWke_HHzgF1lFJhpsQrR_-ky3b-JRY,7447
|
|
17
|
-
chdb/dbapi/cursors.py,sha256=CpV-JOr7fVQfq1mYcYF7o08dLnYT2mNhZ2eQLtJa1N4,11961
|
|
18
|
-
chdb/dbapi/err.py,sha256=kUI9-A8LNqBoMoo4jh2NFsLCOLoPEwh9YIuz_qMoLoM,2017
|
|
19
|
-
chdb/dbapi/times.py,sha256=_qXgDaYwsHntvpIKSKXp1rrYIgtq6Z9pLyLnO2XNoL0,360
|
|
20
|
-
chdb/dbapi/constants/FIELD_TYPE.py,sha256=ytFzgAnGmb9hvdsBlnK68qdZv_a6jYFIXT6VSAb60z8,370
|
|
21
|
-
chdb/dbapi/constants/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
|
-
chdb/session/__init__.py,sha256=fCUROZ5L1-92o2lcASiWJpFu-80-kDoSrNfouLEmLg8,50
|
|
23
|
-
chdb/session/state.py,sha256=eIZ8CbZGnvHziw-arGrv-0vHibNppW116XF1VnthdMk,4462
|
|
24
|
-
chdb/state/__init__.py,sha256=RVUIWDqDi7gte4Os7Mz1wPXFyFpdHT_p1klJC7QtluI,55
|
|
25
|
-
chdb/state/sqlitelike.py,sha256=PHdIJVfbSUvJWU6doMnrg0jVpovtHUG12I_-acZHOko,18338
|
|
26
|
-
chdb/udf/__init__.py,sha256=qSMaPEre7w1pYz8uJ-iZtuu8wYOUNRcI_8UNuaOymGE,80
|
|
27
|
-
chdb/udf/udf.py,sha256=z0A1RmyZrx55bykpvvS-LpVt1lMrQOexjvU5zxCdCSA,3935
|
|
28
|
-
chdb/utils/__init__.py,sha256=tXRcwBRGW2YQNBZWV4Mitw5QlCu_qlSRCjllw15XHbs,171
|
|
29
|
-
chdb/utils/trace.py,sha256=W-pvDoKlnzq6H_7FiWjr5_teN40UNE4E5--zbUrjOIc,2511
|
|
30
|
-
chdb/utils/types.py,sha256=MGLFIjoDvu7Uc2Wy8EDY60jjue66HmMPxbhrujjrZxQ,7530
|
|
31
|
-
chdb-3.6.0.dist-info/LICENSE.txt,sha256=isYVtNCO5910aj6e9bJJ6kQceivkLqsMlFSNYwzGGKI,11366
|
|
32
|
-
chdb-3.6.0.dist-info/METADATA,sha256=E6-S8Ha_hYHaVwGrShfPWxGwu9tZy6I1XVqIOGnv_Ys,25714
|
|
33
|
-
chdb-3.6.0.dist-info/WHEEL,sha256=GqzCFbmUcDe_JjHZ0zYl7w7wj8C0Iq37-tkp4yKFDsU,107
|
|
34
|
-
chdb-3.6.0.dist-info/top_level.txt,sha256=se0Jj0A2-ijfMW51hIjiuNyDJPqy5xJU1G8a_IEdllI,11
|
|
35
|
-
chdb-3.6.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|