quasardb 3.14.2.dev3__cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl → 3.14.2.dev5__cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.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 quasardb might be problematic. Click here for more details.
- quasardb/CMakeFiles/CMakeDirectoryInformation.cmake +1 -1
- quasardb/Makefile +11 -11
- quasardb/__init__.py +21 -7
- quasardb/cmake_install.cmake +6 -0
- quasardb/date/CMakeFiles/CMakeDirectoryInformation.cmake +1 -1
- quasardb/date/CMakeFiles/Export/b76006b2b7125baf1b0b4d4ca4db82bd/dateTargets.cmake +2 -2
- quasardb/date/Makefile +11 -11
- quasardb/date/cmake_install.cmake +6 -0
- quasardb/date/dateTargets.cmake +2 -2
- quasardb/extensions/writer.py +59 -61
- quasardb/firehose.py +24 -22
- quasardb/libqdb_api.so +0 -0
- quasardb/numpy/__init__.py +181 -120
- quasardb/pandas/__init__.py +145 -95
- quasardb/pool.py +13 -2
- quasardb/pybind11/CMakeFiles/CMakeDirectoryInformation.cmake +1 -1
- quasardb/pybind11/Makefile +11 -11
- quasardb/pybind11/cmake_install.cmake +6 -0
- quasardb/quasardb.cpython-311-aarch64-linux-gnu.so +0 -0
- quasardb/range-v3/CMakeFiles/CMakeDirectoryInformation.cmake +1 -1
- quasardb/range-v3/CMakeFiles/Export/48a02d54b5e9e60c30c5f249b431a911/range-v3-targets.cmake +2 -2
- quasardb/range-v3/CMakeFiles/range.v3.headers.dir/build.make +6 -3
- quasardb/range-v3/Makefile +11 -11
- quasardb/range-v3/cmake_install.cmake +6 -0
- quasardb/range-v3/range-v3-config.cmake +2 -2
- quasardb/stats.py +92 -80
- quasardb/table_cache.py +5 -1
- {quasardb-3.14.2.dev3.dist-info → quasardb-3.14.2.dev5.dist-info}/METADATA +13 -8
- quasardb-3.14.2.dev5.dist-info/RECORD +45 -0
- {quasardb-3.14.2.dev3.dist-info → quasardb-3.14.2.dev5.dist-info}/WHEEL +1 -1
- quasardb-3.14.2.dev3.dist-info/RECORD +0 -45
- {quasardb-3.14.2.dev3.dist-info → quasardb-3.14.2.dev5.dist-info}/LICENSE.md +0 -0
- {quasardb-3.14.2.dev3.dist-info → quasardb-3.14.2.dev5.dist-info}/top_level.txt +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# CMAKE generated file: DO NOT EDIT!
|
|
2
|
-
# Generated by "Unix Makefiles" Generator, CMake Version 3.
|
|
2
|
+
# Generated by "Unix Makefiles" Generator, CMake Version 3.31
|
|
3
3
|
|
|
4
4
|
# Relative path conversion top directories.
|
|
5
5
|
set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/mnt/TeamCity/work/938b0bdf6727d1ad/thirdparty")
|
quasardb/Makefile
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# CMAKE generated file: DO NOT EDIT!
|
|
2
|
-
# Generated by "Unix Makefiles" Generator, CMake Version 3.
|
|
2
|
+
# Generated by "Unix Makefiles" Generator, CMake Version 3.31
|
|
3
3
|
|
|
4
4
|
# Default target executed when no arguments are given to make.
|
|
5
5
|
default_target: all
|
|
@@ -48,10 +48,10 @@ cmake_force:
|
|
|
48
48
|
SHELL = /bin/sh
|
|
49
49
|
|
|
50
50
|
# The CMake executable.
|
|
51
|
-
CMAKE_COMMAND = /
|
|
51
|
+
CMAKE_COMMAND = /mnt/TeamCity/temp/buildTmp/build-env-txpz6rhc/lib/python3.11/site-packages/cmake/data/bin/cmake
|
|
52
52
|
|
|
53
53
|
# The command to remove a file.
|
|
54
|
-
RM = /
|
|
54
|
+
RM = /mnt/TeamCity/temp/buildTmp/build-env-txpz6rhc/lib/python3.11/site-packages/cmake/data/bin/cmake -E rm -f
|
|
55
55
|
|
|
56
56
|
# Escaping for special characters.
|
|
57
57
|
EQUALS = =
|
|
@@ -68,7 +68,7 @@ CMAKE_BINARY_DIR = /mnt/TeamCity/work/938b0bdf6727d1ad/build/temp.linux-aarch64-
|
|
|
68
68
|
# Special rule for the target edit_cache
|
|
69
69
|
edit_cache:
|
|
70
70
|
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "No interactive CMake dialog available..."
|
|
71
|
-
/
|
|
71
|
+
/mnt/TeamCity/temp/buildTmp/build-env-txpz6rhc/lib/python3.11/site-packages/cmake/data/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available.
|
|
72
72
|
.PHONY : edit_cache
|
|
73
73
|
|
|
74
74
|
# Special rule for the target edit_cache
|
|
@@ -78,7 +78,7 @@ edit_cache/fast: edit_cache
|
|
|
78
78
|
# Special rule for the target rebuild_cache
|
|
79
79
|
rebuild_cache:
|
|
80
80
|
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake to regenerate build system..."
|
|
81
|
-
/
|
|
81
|
+
/mnt/TeamCity/temp/buildTmp/build-env-txpz6rhc/lib/python3.11/site-packages/cmake/data/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
|
|
82
82
|
.PHONY : rebuild_cache
|
|
83
83
|
|
|
84
84
|
# Special rule for the target rebuild_cache
|
|
@@ -97,37 +97,37 @@ list_install_components/fast: list_install_components
|
|
|
97
97
|
# Special rule for the target install
|
|
98
98
|
install: preinstall
|
|
99
99
|
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..."
|
|
100
|
-
/
|
|
100
|
+
/mnt/TeamCity/temp/buildTmp/build-env-txpz6rhc/lib/python3.11/site-packages/cmake/data/bin/cmake -P cmake_install.cmake
|
|
101
101
|
.PHONY : install
|
|
102
102
|
|
|
103
103
|
# Special rule for the target install
|
|
104
104
|
install/fast: preinstall/fast
|
|
105
105
|
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..."
|
|
106
|
-
/
|
|
106
|
+
/mnt/TeamCity/temp/buildTmp/build-env-txpz6rhc/lib/python3.11/site-packages/cmake/data/bin/cmake -P cmake_install.cmake
|
|
107
107
|
.PHONY : install/fast
|
|
108
108
|
|
|
109
109
|
# Special rule for the target install/local
|
|
110
110
|
install/local: preinstall
|
|
111
111
|
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..."
|
|
112
|
-
/
|
|
112
|
+
/mnt/TeamCity/temp/buildTmp/build-env-txpz6rhc/lib/python3.11/site-packages/cmake/data/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
|
|
113
113
|
.PHONY : install/local
|
|
114
114
|
|
|
115
115
|
# Special rule for the target install/local
|
|
116
116
|
install/local/fast: preinstall/fast
|
|
117
117
|
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..."
|
|
118
|
-
/
|
|
118
|
+
/mnt/TeamCity/temp/buildTmp/build-env-txpz6rhc/lib/python3.11/site-packages/cmake/data/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
|
|
119
119
|
.PHONY : install/local/fast
|
|
120
120
|
|
|
121
121
|
# Special rule for the target install/strip
|
|
122
122
|
install/strip: preinstall
|
|
123
123
|
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..."
|
|
124
|
-
/
|
|
124
|
+
/mnt/TeamCity/temp/buildTmp/build-env-txpz6rhc/lib/python3.11/site-packages/cmake/data/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
|
|
125
125
|
.PHONY : install/strip
|
|
126
126
|
|
|
127
127
|
# Special rule for the target install/strip
|
|
128
128
|
install/strip/fast: preinstall/fast
|
|
129
129
|
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..."
|
|
130
|
-
/
|
|
130
|
+
/mnt/TeamCity/temp/buildTmp/build-env-txpz6rhc/lib/python3.11/site-packages/cmake/data/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
|
|
131
131
|
.PHONY : install/strip/fast
|
|
132
132
|
|
|
133
133
|
# The main all target
|
quasardb/__init__.py
CHANGED
|
@@ -35,7 +35,8 @@
|
|
|
35
35
|
.. moduleauthor: quasardb SAS. All rights reserved
|
|
36
36
|
"""
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
|
|
39
|
+
def generic_error_msg(msg, e=None):
|
|
39
40
|
msg_str = "\n".join(msg)
|
|
40
41
|
|
|
41
42
|
if e is None:
|
|
@@ -45,7 +46,9 @@ def generic_error_msg(msg, e = None):
|
|
|
45
46
|
{}
|
|
46
47
|
|
|
47
48
|
**************************************************************************
|
|
48
|
-
""".format(
|
|
49
|
+
""".format(
|
|
50
|
+
msg_str, type(e), str(e)
|
|
51
|
+
)
|
|
49
52
|
else:
|
|
50
53
|
return """
|
|
51
54
|
**************************************************************************
|
|
@@ -60,7 +63,10 @@ Original exception:
|
|
|
60
63
|
Message: {}
|
|
61
64
|
|
|
62
65
|
**************************************************************************
|
|
63
|
-
""".format(
|
|
66
|
+
""".format(
|
|
67
|
+
msg_str, type(e), str(e)
|
|
68
|
+
)
|
|
69
|
+
|
|
64
70
|
|
|
65
71
|
def link_error_msg(e):
|
|
66
72
|
msg = [
|
|
@@ -70,10 +76,12 @@ def link_error_msg(e):
|
|
|
70
76
|
"",
|
|
71
77
|
"Please ensure you do not have multiple versions of libqdb_api installed.",
|
|
72
78
|
"If you believe this to be a bug, please reach out to QuasarDB at",
|
|
73
|
-
"support@quasar.ai, and include the underlying error message:"
|
|
79
|
+
"support@quasar.ai, and include the underlying error message:",
|
|
80
|
+
]
|
|
74
81
|
|
|
75
82
|
return generic_error_msg(msg, e)
|
|
76
83
|
|
|
84
|
+
|
|
77
85
|
def glibc_error_msg(e):
|
|
78
86
|
msg = [
|
|
79
87
|
"QuasarDB was unable to find the expected GLIBC version on this machine.",
|
|
@@ -85,10 +93,12 @@ def glibc_error_msg(e):
|
|
|
85
93
|
"platform tag as defined in PEP 599. ",
|
|
86
94
|
"",
|
|
87
95
|
"If you believe this to be a bug, please reach out to QuasarDB at",
|
|
88
|
-
"support@quasar.ai, and include the underlying error message:"
|
|
96
|
+
"support@quasar.ai, and include the underlying error message:",
|
|
97
|
+
]
|
|
89
98
|
|
|
90
99
|
return generic_error_msg(msg, e)
|
|
91
100
|
|
|
101
|
+
|
|
92
102
|
def unknown_error_msg():
|
|
93
103
|
msg = [
|
|
94
104
|
"Unable to import quasardb module: unknown error. ",
|
|
@@ -99,9 +109,12 @@ def unknown_error_msg():
|
|
|
99
109
|
" - the current working directory already contains a 'quasardb' subdirectory.",
|
|
100
110
|
"",
|
|
101
111
|
"If you believe this to be a bug, please reach out to QuasarDB at",
|
|
102
|
-
"support@quasar.ai"
|
|
112
|
+
"support@quasar.ai",
|
|
113
|
+
]
|
|
103
114
|
|
|
104
115
|
return generic_error_msg(msg)
|
|
116
|
+
|
|
117
|
+
|
|
105
118
|
try:
|
|
106
119
|
from quasardb.quasardb import *
|
|
107
120
|
except BaseException as e:
|
|
@@ -114,10 +127,11 @@ except BaseException as e:
|
|
|
114
127
|
else:
|
|
115
128
|
from quasardb import *
|
|
116
129
|
|
|
117
|
-
if not
|
|
130
|
+
if not "quasardb" in locals():
|
|
118
131
|
print(unknown_error_msg())
|
|
119
132
|
raise ImportError()
|
|
120
133
|
|
|
121
134
|
|
|
122
135
|
from .extensions import extend_module
|
|
136
|
+
|
|
123
137
|
extend_module(quasardb)
|
quasardb/cmake_install.cmake
CHANGED
|
@@ -50,3 +50,9 @@ if(NOT CMAKE_INSTALL_LOCAL_ONLY)
|
|
|
50
50
|
|
|
51
51
|
endif()
|
|
52
52
|
|
|
53
|
+
string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
|
|
54
|
+
"${CMAKE_INSTALL_MANIFEST_FILES}")
|
|
55
|
+
if(CMAKE_INSTALL_LOCAL_ONLY)
|
|
56
|
+
file(WRITE "/mnt/TeamCity/work/938b0bdf6727d1ad/build/lib.linux-aarch64-cpython-311/quasardb/install_local_manifest.txt"
|
|
57
|
+
"${CMAKE_INSTALL_MANIFEST_CONTENT}")
|
|
58
|
+
endif()
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# CMAKE generated file: DO NOT EDIT!
|
|
2
|
-
# Generated by "Unix Makefiles" Generator, CMake Version 3.
|
|
2
|
+
# Generated by "Unix Makefiles" Generator, CMake Version 3.31
|
|
3
3
|
|
|
4
4
|
# Relative path conversion top directories.
|
|
5
5
|
set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/mnt/TeamCity/work/938b0bdf6727d1ad/thirdparty")
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# Generated by CMake
|
|
2
2
|
|
|
3
3
|
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8)
|
|
4
|
-
message(FATAL_ERROR "CMake >=
|
|
4
|
+
message(FATAL_ERROR "CMake >= 3.1.0 required")
|
|
5
5
|
endif()
|
|
6
6
|
if(CMAKE_VERSION VERSION_LESS "3.1.0")
|
|
7
7
|
message(FATAL_ERROR "CMake >= 3.1.0 required")
|
|
8
8
|
endif()
|
|
9
9
|
cmake_policy(PUSH)
|
|
10
|
-
cmake_policy(VERSION 3.1.0...3.
|
|
10
|
+
cmake_policy(VERSION 3.1.0...3.29)
|
|
11
11
|
#----------------------------------------------------------------
|
|
12
12
|
# Generated CMake target import file.
|
|
13
13
|
#----------------------------------------------------------------
|
quasardb/date/Makefile
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# CMAKE generated file: DO NOT EDIT!
|
|
2
|
-
# Generated by "Unix Makefiles" Generator, CMake Version 3.
|
|
2
|
+
# Generated by "Unix Makefiles" Generator, CMake Version 3.31
|
|
3
3
|
|
|
4
4
|
# Default target executed when no arguments are given to make.
|
|
5
5
|
default_target: all
|
|
@@ -48,10 +48,10 @@ cmake_force:
|
|
|
48
48
|
SHELL = /bin/sh
|
|
49
49
|
|
|
50
50
|
# The CMake executable.
|
|
51
|
-
CMAKE_COMMAND = /
|
|
51
|
+
CMAKE_COMMAND = /mnt/TeamCity/temp/buildTmp/build-env-txpz6rhc/lib/python3.11/site-packages/cmake/data/bin/cmake
|
|
52
52
|
|
|
53
53
|
# The command to remove a file.
|
|
54
|
-
RM = /
|
|
54
|
+
RM = /mnt/TeamCity/temp/buildTmp/build-env-txpz6rhc/lib/python3.11/site-packages/cmake/data/bin/cmake -E rm -f
|
|
55
55
|
|
|
56
56
|
# Escaping for special characters.
|
|
57
57
|
EQUALS = =
|
|
@@ -68,7 +68,7 @@ CMAKE_BINARY_DIR = /mnt/TeamCity/work/938b0bdf6727d1ad/build/temp.linux-aarch64-
|
|
|
68
68
|
# Special rule for the target edit_cache
|
|
69
69
|
edit_cache:
|
|
70
70
|
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "No interactive CMake dialog available..."
|
|
71
|
-
/
|
|
71
|
+
/mnt/TeamCity/temp/buildTmp/build-env-txpz6rhc/lib/python3.11/site-packages/cmake/data/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available.
|
|
72
72
|
.PHONY : edit_cache
|
|
73
73
|
|
|
74
74
|
# Special rule for the target edit_cache
|
|
@@ -78,7 +78,7 @@ edit_cache/fast: edit_cache
|
|
|
78
78
|
# Special rule for the target rebuild_cache
|
|
79
79
|
rebuild_cache:
|
|
80
80
|
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake to regenerate build system..."
|
|
81
|
-
/
|
|
81
|
+
/mnt/TeamCity/temp/buildTmp/build-env-txpz6rhc/lib/python3.11/site-packages/cmake/data/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
|
|
82
82
|
.PHONY : rebuild_cache
|
|
83
83
|
|
|
84
84
|
# Special rule for the target rebuild_cache
|
|
@@ -97,37 +97,37 @@ list_install_components/fast: list_install_components
|
|
|
97
97
|
# Special rule for the target install
|
|
98
98
|
install: preinstall
|
|
99
99
|
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..."
|
|
100
|
-
/
|
|
100
|
+
/mnt/TeamCity/temp/buildTmp/build-env-txpz6rhc/lib/python3.11/site-packages/cmake/data/bin/cmake -P cmake_install.cmake
|
|
101
101
|
.PHONY : install
|
|
102
102
|
|
|
103
103
|
# Special rule for the target install
|
|
104
104
|
install/fast: preinstall/fast
|
|
105
105
|
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..."
|
|
106
|
-
/
|
|
106
|
+
/mnt/TeamCity/temp/buildTmp/build-env-txpz6rhc/lib/python3.11/site-packages/cmake/data/bin/cmake -P cmake_install.cmake
|
|
107
107
|
.PHONY : install/fast
|
|
108
108
|
|
|
109
109
|
# Special rule for the target install/local
|
|
110
110
|
install/local: preinstall
|
|
111
111
|
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..."
|
|
112
|
-
/
|
|
112
|
+
/mnt/TeamCity/temp/buildTmp/build-env-txpz6rhc/lib/python3.11/site-packages/cmake/data/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
|
|
113
113
|
.PHONY : install/local
|
|
114
114
|
|
|
115
115
|
# Special rule for the target install/local
|
|
116
116
|
install/local/fast: preinstall/fast
|
|
117
117
|
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..."
|
|
118
|
-
/
|
|
118
|
+
/mnt/TeamCity/temp/buildTmp/build-env-txpz6rhc/lib/python3.11/site-packages/cmake/data/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
|
|
119
119
|
.PHONY : install/local/fast
|
|
120
120
|
|
|
121
121
|
# Special rule for the target install/strip
|
|
122
122
|
install/strip: preinstall
|
|
123
123
|
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..."
|
|
124
|
-
/
|
|
124
|
+
/mnt/TeamCity/temp/buildTmp/build-env-txpz6rhc/lib/python3.11/site-packages/cmake/data/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
|
|
125
125
|
.PHONY : install/strip
|
|
126
126
|
|
|
127
127
|
# Special rule for the target install/strip
|
|
128
128
|
install/strip/fast: preinstall/fast
|
|
129
129
|
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..."
|
|
130
|
-
/
|
|
130
|
+
/mnt/TeamCity/temp/buildTmp/build-env-txpz6rhc/lib/python3.11/site-packages/cmake/data/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
|
|
131
131
|
.PHONY : install/strip/fast
|
|
132
132
|
|
|
133
133
|
# The main all target
|
|
@@ -73,3 +73,9 @@ if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT
|
|
|
73
73
|
)
|
|
74
74
|
endif()
|
|
75
75
|
|
|
76
|
+
string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
|
|
77
|
+
"${CMAKE_INSTALL_MANIFEST_FILES}")
|
|
78
|
+
if(CMAKE_INSTALL_LOCAL_ONLY)
|
|
79
|
+
file(WRITE "/mnt/TeamCity/work/938b0bdf6727d1ad/build/lib.linux-aarch64-cpython-311/quasardb/date/install_local_manifest.txt"
|
|
80
|
+
"${CMAKE_INSTALL_MANIFEST_CONTENT}")
|
|
81
|
+
endif()
|
quasardb/date/dateTargets.cmake
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# Generated by CMake
|
|
2
2
|
|
|
3
3
|
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8)
|
|
4
|
-
message(FATAL_ERROR "CMake >=
|
|
4
|
+
message(FATAL_ERROR "CMake >= 3.0.0 required")
|
|
5
5
|
endif()
|
|
6
6
|
if(CMAKE_VERSION VERSION_LESS "3.0.0")
|
|
7
7
|
message(FATAL_ERROR "CMake >= 3.0.0 required")
|
|
8
8
|
endif()
|
|
9
9
|
cmake_policy(PUSH)
|
|
10
|
-
cmake_policy(VERSION 3.0.0...3.
|
|
10
|
+
cmake_policy(VERSION 3.0.0...3.29)
|
|
11
11
|
#----------------------------------------------------------------
|
|
12
12
|
# Generated CMake target import file.
|
|
13
13
|
#----------------------------------------------------------------
|
quasardb/extensions/writer.py
CHANGED
|
@@ -5,9 +5,10 @@ import numpy.ma as ma
|
|
|
5
5
|
|
|
6
6
|
__all__ = []
|
|
7
7
|
|
|
8
|
+
|
|
8
9
|
def _ensure_ctype(self, idx, ctype):
|
|
9
|
-
assert
|
|
10
|
-
infos = self._legacy_state[
|
|
10
|
+
assert "table" in self._legacy_state
|
|
11
|
+
infos = self._legacy_state["table"].list_columns()
|
|
11
12
|
cinfo = infos[idx]
|
|
12
13
|
|
|
13
14
|
ctype_data = copy.copy(ctype)
|
|
@@ -24,80 +25,81 @@ def _ensure_ctype(self, idx, ctype):
|
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
def _legacy_next_row(self, table):
|
|
27
|
-
if
|
|
28
|
-
self._legacy_state[
|
|
28
|
+
if "pending" not in self._legacy_state:
|
|
29
|
+
self._legacy_state["pending"] = []
|
|
29
30
|
|
|
30
|
-
if
|
|
31
|
-
self._legacy_state[
|
|
31
|
+
if "table" not in self._legacy_state:
|
|
32
|
+
self._legacy_state["table"] = table
|
|
32
33
|
|
|
33
|
-
self._legacy_state[
|
|
34
|
+
self._legacy_state["pending"].append({"by_index": {}})
|
|
34
35
|
|
|
35
36
|
# Return reference to the row inside the buffer
|
|
36
|
-
return self._legacy_state[
|
|
37
|
+
return self._legacy_state["pending"][-1]
|
|
37
38
|
|
|
38
39
|
|
|
39
40
|
def _legacy_current_row(self):
|
|
40
|
-
return self._legacy_state[
|
|
41
|
+
return self._legacy_state["pending"][-1]
|
|
41
42
|
|
|
42
43
|
|
|
43
44
|
def _legacy_start_row(self, table, x):
|
|
44
45
|
row = _legacy_next_row(self, table)
|
|
45
|
-
assert
|
|
46
|
-
row[
|
|
46
|
+
assert "$timestamp" not in row
|
|
47
|
+
row["$timestamp"] = x
|
|
47
48
|
|
|
48
49
|
|
|
49
50
|
def _legacy_set_double(self, idx, x):
|
|
50
51
|
_ensure_ctype(self, idx, quasardb.ColumnType.Double)
|
|
51
52
|
assert isinstance(x, float)
|
|
52
|
-
assert idx not in _legacy_current_row(self)[
|
|
53
|
-
_legacy_current_row(self)[
|
|
53
|
+
assert idx not in _legacy_current_row(self)["by_index"]
|
|
54
|
+
_legacy_current_row(self)["by_index"][idx] = x
|
|
54
55
|
|
|
55
56
|
|
|
56
57
|
def _legacy_set_int64(self, idx, x):
|
|
57
58
|
_ensure_ctype(self, idx, quasardb.ColumnType.Int64)
|
|
58
59
|
assert isinstance(x, int)
|
|
59
|
-
assert idx not in _legacy_current_row(self)[
|
|
60
|
-
_legacy_current_row(self)[
|
|
60
|
+
assert idx not in _legacy_current_row(self)["by_index"]
|
|
61
|
+
_legacy_current_row(self)["by_index"][idx] = x
|
|
61
62
|
|
|
62
63
|
|
|
63
64
|
def _legacy_set_timestamp(self, idx, x):
|
|
64
65
|
_ensure_ctype(self, idx, quasardb.ColumnType.Timestamp)
|
|
65
|
-
assert idx not in _legacy_current_row(self)[
|
|
66
|
-
_legacy_current_row(self)[
|
|
66
|
+
assert idx not in _legacy_current_row(self)["by_index"]
|
|
67
|
+
_legacy_current_row(self)["by_index"][idx] = x
|
|
67
68
|
|
|
68
69
|
|
|
69
70
|
def _legacy_set_string(self, idx, x):
|
|
70
71
|
_ensure_ctype(self, idx, quasardb.ColumnType.String)
|
|
71
72
|
assert isinstance(x, str)
|
|
72
|
-
assert idx not in _legacy_current_row(self)[
|
|
73
|
+
assert idx not in _legacy_current_row(self)["by_index"]
|
|
73
74
|
|
|
74
|
-
_legacy_current_row(self)[
|
|
75
|
+
_legacy_current_row(self)["by_index"][idx] = x
|
|
75
76
|
|
|
76
77
|
|
|
77
78
|
def _legacy_set_blob(self, idx, x):
|
|
78
79
|
_ensure_ctype(self, idx, quasardb.ColumnType.Blob)
|
|
79
80
|
assert isinstance(x, bytes)
|
|
80
|
-
assert idx not in _legacy_current_row(self)[
|
|
81
|
+
assert idx not in _legacy_current_row(self)["by_index"]
|
|
81
82
|
|
|
82
|
-
_legacy_current_row(self)[
|
|
83
|
+
_legacy_current_row(self)["by_index"][idx] = x
|
|
83
84
|
|
|
84
85
|
|
|
85
86
|
def _legacy_push(self):
|
|
86
|
-
if
|
|
87
|
+
if "pending" not in self._legacy_state:
|
|
87
88
|
# Extremely likely default case, no "old" rows
|
|
88
89
|
return
|
|
89
90
|
|
|
90
|
-
assert
|
|
91
|
-
table = self._legacy_state[
|
|
91
|
+
assert "table" in self._legacy_state
|
|
92
|
+
table = self._legacy_state["table"]
|
|
92
93
|
|
|
93
94
|
# Some useful constants
|
|
94
|
-
dtype_by_ctype = {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
95
|
+
dtype_by_ctype = {
|
|
96
|
+
quasardb.ColumnType.Double: np.dtype("float64"),
|
|
97
|
+
quasardb.ColumnType.Int64: np.dtype("int64"),
|
|
98
|
+
quasardb.ColumnType.Timestamp: np.dtype("datetime64[ns]"),
|
|
99
|
+
quasardb.ColumnType.String: np.dtype("unicode"),
|
|
100
|
+
quasardb.ColumnType.Symbol: np.dtype("unicode"),
|
|
101
|
+
quasardb.ColumnType.Blob: np.dtype("bytes"),
|
|
102
|
+
}
|
|
101
103
|
|
|
102
104
|
ctype_by_idx = {}
|
|
103
105
|
cinfos = table.list_columns()
|
|
@@ -107,31 +109,30 @@ def _legacy_push(self):
|
|
|
107
109
|
all_idx = set(ctype_by_idx.keys())
|
|
108
110
|
|
|
109
111
|
# Prepare data structure
|
|
110
|
-
pivoted = {
|
|
111
|
-
'by_index': {}}
|
|
112
|
+
pivoted = {"$timestamp": [], "by_index": {}}
|
|
112
113
|
for i in all_idx:
|
|
113
|
-
pivoted[
|
|
114
|
+
pivoted["by_index"][i] = []
|
|
114
115
|
|
|
115
116
|
# Do the actual pivot
|
|
116
|
-
for row in self._legacy_state[
|
|
117
|
-
assert
|
|
118
|
-
assert
|
|
117
|
+
for row in self._legacy_state["pending"]:
|
|
118
|
+
assert "$timestamp" in row
|
|
119
|
+
assert "by_index" in row
|
|
119
120
|
|
|
120
|
-
pivoted[
|
|
121
|
+
pivoted["$timestamp"].append(row["$timestamp"])
|
|
121
122
|
|
|
122
|
-
for idx in pivoted[
|
|
123
|
-
val = row[
|
|
124
|
-
pivoted[
|
|
123
|
+
for idx in pivoted["by_index"].keys():
|
|
124
|
+
val = row["by_index"].get(idx, None)
|
|
125
|
+
pivoted["by_index"][idx].append(val)
|
|
125
126
|
|
|
126
127
|
# Validation / verification, not strictly necessary. Effectively
|
|
127
128
|
# ensures that we have the exact same amount of values for every
|
|
128
129
|
# column
|
|
129
|
-
for xs in pivoted[
|
|
130
|
-
assert len(xs) == len(pivoted[
|
|
130
|
+
for xs in pivoted["by_index"].values():
|
|
131
|
+
assert len(xs) == len(pivoted["$timestamp"])
|
|
131
132
|
|
|
132
133
|
column_data = []
|
|
133
134
|
|
|
134
|
-
for idx,xs in pivoted[
|
|
135
|
+
for idx, xs in pivoted["by_index"].items():
|
|
135
136
|
ctype = ctype_by_idx[idx]
|
|
136
137
|
dtype = dtype_by_ctype[ctype]
|
|
137
138
|
|
|
@@ -141,22 +142,19 @@ def _legacy_push(self):
|
|
|
141
142
|
|
|
142
143
|
xs_ = []
|
|
143
144
|
if all(mask):
|
|
144
|
-
xs_ = ma.masked_all(len(xs),
|
|
145
|
-
dtype=dtype)
|
|
145
|
+
xs_ = ma.masked_all(len(xs), dtype=dtype)
|
|
146
146
|
else:
|
|
147
147
|
xs_ = ma.masked_array(data=np.array(xs, dtype), mask=mask)
|
|
148
148
|
|
|
149
|
-
assert len(xs_) == len(pivoted[
|
|
149
|
+
assert len(xs_) == len(pivoted["$timestamp"])
|
|
150
150
|
|
|
151
151
|
column_data.append(xs_)
|
|
152
152
|
|
|
153
|
-
|
|
154
153
|
push_data = quasardb.WriterData()
|
|
155
|
-
index = np.array(pivoted[
|
|
154
|
+
index = np.array(pivoted["$timestamp"], np.dtype("datetime64[ns]"))
|
|
156
155
|
|
|
157
156
|
push_data.append(table, index, column_data)
|
|
158
157
|
|
|
159
|
-
|
|
160
158
|
self._legacy_state = {}
|
|
161
159
|
return push_data
|
|
162
160
|
|
|
@@ -180,14 +178,14 @@ def extend_writer(x):
|
|
|
180
178
|
in C++ with few benefits.
|
|
181
179
|
"""
|
|
182
180
|
|
|
183
|
-
x.start_row
|
|
184
|
-
x.set_double
|
|
185
|
-
x.set_int64
|
|
186
|
-
x.set_string
|
|
187
|
-
x.set_blob
|
|
188
|
-
x.set_timestamp
|
|
189
|
-
|
|
190
|
-
x.push
|
|
191
|
-
x.push_fast
|
|
192
|
-
x.push_async
|
|
193
|
-
x.push_truncate
|
|
181
|
+
x.start_row = _legacy_start_row
|
|
182
|
+
x.set_double = _legacy_set_double
|
|
183
|
+
x.set_int64 = _legacy_set_int64
|
|
184
|
+
x.set_string = _legacy_set_string
|
|
185
|
+
x.set_blob = _legacy_set_blob
|
|
186
|
+
x.set_timestamp = _legacy_set_timestamp
|
|
187
|
+
|
|
188
|
+
x.push = _wrap_fn(x.push, _legacy_push)
|
|
189
|
+
x.push_fast = _wrap_fn(x.push_fast, _legacy_push)
|
|
190
|
+
x.push_async = _wrap_fn(x.push_async, _legacy_push)
|
|
191
|
+
x.push_truncate = _wrap_fn(x.push_truncate, _legacy_push)
|
quasardb/firehose.py
CHANGED
|
@@ -6,15 +6,14 @@ import numpy as np
|
|
|
6
6
|
FIREHOSE_TABLE = "$qdb.firehose"
|
|
7
7
|
POLL_INTERVAL = 0.1
|
|
8
8
|
|
|
9
|
-
logger = logging.getLogger(
|
|
9
|
+
logger = logging.getLogger("quasardb.firehose")
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
def _init():
|
|
13
13
|
"""
|
|
14
14
|
Initialize our internal state.
|
|
15
15
|
"""
|
|
16
|
-
return {
|
|
17
|
-
'seen': set()}
|
|
16
|
+
return {"last": None, "seen": set()}
|
|
18
17
|
|
|
19
18
|
|
|
20
19
|
def _get_transactions_since(conn, table_name, last):
|
|
@@ -24,10 +23,12 @@ def _get_transactions_since(conn, table_name, last):
|
|
|
24
23
|
"""
|
|
25
24
|
if last is None:
|
|
26
25
|
q = "SELECT $timestamp, transaction_id, begin, end FROM \"{}\" WHERE table = '{}' ORDER BY $timestamp".format(
|
|
27
|
-
FIREHOSE_TABLE, table_name
|
|
26
|
+
FIREHOSE_TABLE, table_name
|
|
27
|
+
)
|
|
28
28
|
else:
|
|
29
29
|
q = "SELECT $timestamp, transaction_id, begin, end FROM \"{}\" IN RANGE ({}, +1y) WHERE table = '{}' ORDER BY $timestamp".format(
|
|
30
|
-
FIREHOSE_TABLE, last[
|
|
30
|
+
FIREHOSE_TABLE, last["$timestamp"], table_name
|
|
31
|
+
)
|
|
31
32
|
|
|
32
33
|
return conn.query(q)
|
|
33
34
|
|
|
@@ -36,8 +37,7 @@ def _get_transaction_data(conn, table_name, begin, end):
|
|
|
36
37
|
"""
|
|
37
38
|
Gets all data from a certain table.
|
|
38
39
|
"""
|
|
39
|
-
q =
|
|
40
|
-
table_name, begin, end)
|
|
40
|
+
q = 'SELECT * FROM "{}" IN RANGE ({}, {}) '.format(table_name, begin, end)
|
|
41
41
|
return conn.query(q)
|
|
42
42
|
|
|
43
43
|
|
|
@@ -50,33 +50,35 @@ def _get_next(conn, table_name, state):
|
|
|
50
50
|
# 3. For each of the transactions, pull in all data
|
|
51
51
|
# 4. Concatenate all this data (in order of quasardb transaction)
|
|
52
52
|
|
|
53
|
-
txs = _get_transactions_since(conn, table_name, state[
|
|
53
|
+
txs = _get_transactions_since(conn, table_name, state["last"])
|
|
54
54
|
|
|
55
55
|
xs = list()
|
|
56
56
|
for tx in txs:
|
|
57
|
-
txid = tx[
|
|
57
|
+
txid = tx["transaction_id"]
|
|
58
58
|
|
|
59
|
-
if state[
|
|
59
|
+
if state["last"] is not None and tx["$timestamp"] > state["last"]["$timestamp"]:
|
|
60
60
|
# At this point we are guaranteed that the transaction we encounter is
|
|
61
61
|
# 'new', will not conflict with any other transaction ids. It is thus
|
|
62
62
|
# safe to reset the txid set.
|
|
63
|
-
state[
|
|
64
|
-
|
|
65
|
-
if txid not in state[
|
|
66
|
-
xs = xs + _get_transaction_data(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
63
|
+
state["seen"] = set()
|
|
64
|
+
|
|
65
|
+
if txid not in state["seen"]:
|
|
66
|
+
xs = xs + _get_transaction_data(
|
|
67
|
+
conn,
|
|
68
|
+
table_name,
|
|
69
|
+
tx["begin"],
|
|
70
|
+
# The firehose logs transaction `end` span as
|
|
71
|
+
# end inclusive, while our bulk reader and/or query
|
|
72
|
+
# language are end exclusive.
|
|
73
|
+
tx["end"] + np.timedelta64(1, "ns"),
|
|
74
|
+
)
|
|
73
75
|
|
|
74
76
|
# Because it is possible that multiple firehose changes are stored with the
|
|
75
77
|
# exact same $timestamp, we also keep track of the actually seen
|
|
76
78
|
# transaction ids.
|
|
77
|
-
state[
|
|
79
|
+
state["seen"].add(txid)
|
|
78
80
|
|
|
79
|
-
state[
|
|
81
|
+
state["last"] = tx
|
|
80
82
|
|
|
81
83
|
return (state, xs)
|
|
82
84
|
|
quasardb/libqdb_api.so
CHANGED
|
Binary file
|