quasardb 3.14.2.dev3__cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl → 3.14.2.dev5__cp39-cp39-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.

Files changed (33) hide show
  1. quasardb/CMakeFiles/CMakeDirectoryInformation.cmake +1 -1
  2. quasardb/Makefile +11 -11
  3. quasardb/__init__.py +21 -7
  4. quasardb/cmake_install.cmake +6 -0
  5. quasardb/date/CMakeFiles/CMakeDirectoryInformation.cmake +1 -1
  6. quasardb/date/CMakeFiles/Export/b76006b2b7125baf1b0b4d4ca4db82bd/dateTargets.cmake +2 -2
  7. quasardb/date/Makefile +11 -11
  8. quasardb/date/cmake_install.cmake +6 -0
  9. quasardb/date/dateTargets.cmake +2 -2
  10. quasardb/extensions/writer.py +59 -61
  11. quasardb/firehose.py +24 -22
  12. quasardb/libqdb_api.so +0 -0
  13. quasardb/numpy/__init__.py +181 -120
  14. quasardb/pandas/__init__.py +145 -95
  15. quasardb/pool.py +13 -2
  16. quasardb/pybind11/CMakeFiles/CMakeDirectoryInformation.cmake +1 -1
  17. quasardb/pybind11/Makefile +11 -11
  18. quasardb/pybind11/cmake_install.cmake +6 -0
  19. quasardb/quasardb.cpython-39-aarch64-linux-gnu.so +0 -0
  20. quasardb/range-v3/CMakeFiles/CMakeDirectoryInformation.cmake +1 -1
  21. quasardb/range-v3/CMakeFiles/Export/48a02d54b5e9e60c30c5f249b431a911/range-v3-targets.cmake +2 -2
  22. quasardb/range-v3/CMakeFiles/range.v3.headers.dir/build.make +6 -3
  23. quasardb/range-v3/Makefile +11 -11
  24. quasardb/range-v3/cmake_install.cmake +6 -0
  25. quasardb/range-v3/range-v3-config.cmake +2 -2
  26. quasardb/stats.py +92 -80
  27. quasardb/table_cache.py +5 -1
  28. {quasardb-3.14.2.dev3.dist-info → quasardb-3.14.2.dev5.dist-info}/METADATA +13 -8
  29. quasardb-3.14.2.dev5.dist-info/RECORD +45 -0
  30. {quasardb-3.14.2.dev3.dist-info → quasardb-3.14.2.dev5.dist-info}/WHEEL +1 -1
  31. quasardb-3.14.2.dev3.dist-info/RECORD +0 -45
  32. {quasardb-3.14.2.dev3.dist-info → quasardb-3.14.2.dev5.dist-info}/LICENSE.md +0 -0
  33. {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.30
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.30
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 = /opt/_internal/pipx/venvs/cmake/lib/python3.12/site-packages/cmake/data/bin/cmake
51
+ CMAKE_COMMAND = /mnt/TeamCity/temp/buildTmp/build-env-nx5kn1vc/lib/python3.9/site-packages/cmake/data/bin/cmake
52
52
 
53
53
  # The command to remove a file.
54
- RM = /opt/_internal/pipx/venvs/cmake/lib/python3.12/site-packages/cmake/data/bin/cmake -E rm -f
54
+ RM = /mnt/TeamCity/temp/buildTmp/build-env-nx5kn1vc/lib/python3.9/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
- /opt/_internal/pipx/venvs/cmake/lib/python3.12/site-packages/cmake/data/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available.
71
+ /mnt/TeamCity/temp/buildTmp/build-env-nx5kn1vc/lib/python3.9/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
- /opt/_internal/pipx/venvs/cmake/lib/python3.12/site-packages/cmake/data/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
81
+ /mnt/TeamCity/temp/buildTmp/build-env-nx5kn1vc/lib/python3.9/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
- /opt/_internal/pipx/venvs/cmake/lib/python3.12/site-packages/cmake/data/bin/cmake -P cmake_install.cmake
100
+ /mnt/TeamCity/temp/buildTmp/build-env-nx5kn1vc/lib/python3.9/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
- /opt/_internal/pipx/venvs/cmake/lib/python3.12/site-packages/cmake/data/bin/cmake -P cmake_install.cmake
106
+ /mnt/TeamCity/temp/buildTmp/build-env-nx5kn1vc/lib/python3.9/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
- /opt/_internal/pipx/venvs/cmake/lib/python3.12/site-packages/cmake/data/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
112
+ /mnt/TeamCity/temp/buildTmp/build-env-nx5kn1vc/lib/python3.9/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
- /opt/_internal/pipx/venvs/cmake/lib/python3.12/site-packages/cmake/data/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
118
+ /mnt/TeamCity/temp/buildTmp/build-env-nx5kn1vc/lib/python3.9/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
- /opt/_internal/pipx/venvs/cmake/lib/python3.12/site-packages/cmake/data/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
124
+ /mnt/TeamCity/temp/buildTmp/build-env-nx5kn1vc/lib/python3.9/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
- /opt/_internal/pipx/venvs/cmake/lib/python3.12/site-packages/cmake/data/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
130
+ /mnt/TeamCity/temp/buildTmp/build-env-nx5kn1vc/lib/python3.9/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
- def generic_error_msg(msg, e = None):
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(msg_str, type(e), str(e))
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(msg_str, type(e), str(e))
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 'quasardb' in locals():
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)
@@ -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-39/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.30
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 >= 2.8.0 required")
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.28)
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.30
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 = /opt/_internal/pipx/venvs/cmake/lib/python3.12/site-packages/cmake/data/bin/cmake
51
+ CMAKE_COMMAND = /mnt/TeamCity/temp/buildTmp/build-env-nx5kn1vc/lib/python3.9/site-packages/cmake/data/bin/cmake
52
52
 
53
53
  # The command to remove a file.
54
- RM = /opt/_internal/pipx/venvs/cmake/lib/python3.12/site-packages/cmake/data/bin/cmake -E rm -f
54
+ RM = /mnt/TeamCity/temp/buildTmp/build-env-nx5kn1vc/lib/python3.9/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
- /opt/_internal/pipx/venvs/cmake/lib/python3.12/site-packages/cmake/data/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available.
71
+ /mnt/TeamCity/temp/buildTmp/build-env-nx5kn1vc/lib/python3.9/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
- /opt/_internal/pipx/venvs/cmake/lib/python3.12/site-packages/cmake/data/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
81
+ /mnt/TeamCity/temp/buildTmp/build-env-nx5kn1vc/lib/python3.9/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
- /opt/_internal/pipx/venvs/cmake/lib/python3.12/site-packages/cmake/data/bin/cmake -P cmake_install.cmake
100
+ /mnt/TeamCity/temp/buildTmp/build-env-nx5kn1vc/lib/python3.9/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
- /opt/_internal/pipx/venvs/cmake/lib/python3.12/site-packages/cmake/data/bin/cmake -P cmake_install.cmake
106
+ /mnt/TeamCity/temp/buildTmp/build-env-nx5kn1vc/lib/python3.9/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
- /opt/_internal/pipx/venvs/cmake/lib/python3.12/site-packages/cmake/data/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
112
+ /mnt/TeamCity/temp/buildTmp/build-env-nx5kn1vc/lib/python3.9/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
- /opt/_internal/pipx/venvs/cmake/lib/python3.12/site-packages/cmake/data/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
118
+ /mnt/TeamCity/temp/buildTmp/build-env-nx5kn1vc/lib/python3.9/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
- /opt/_internal/pipx/venvs/cmake/lib/python3.12/site-packages/cmake/data/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
124
+ /mnt/TeamCity/temp/buildTmp/build-env-nx5kn1vc/lib/python3.9/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
- /opt/_internal/pipx/venvs/cmake/lib/python3.12/site-packages/cmake/data/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
130
+ /mnt/TeamCity/temp/buildTmp/build-env-nx5kn1vc/lib/python3.9/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-39/quasardb/date/install_local_manifest.txt"
80
+ "${CMAKE_INSTALL_MANIFEST_CONTENT}")
81
+ endif()
@@ -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 >= 2.8.0 required")
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.28)
10
+ cmake_policy(VERSION 3.0.0...3.29)
11
11
  #----------------------------------------------------------------
12
12
  # Generated CMake target import file.
13
13
  #----------------------------------------------------------------
@@ -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 'table' in self._legacy_state
10
- infos = self._legacy_state['table'].list_columns()
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 'pending' not in self._legacy_state:
28
- self._legacy_state['pending'] = []
28
+ if "pending" not in self._legacy_state:
29
+ self._legacy_state["pending"] = []
29
30
 
30
- if 'table' not in self._legacy_state:
31
- self._legacy_state['table'] = table
31
+ if "table" not in self._legacy_state:
32
+ self._legacy_state["table"] = table
32
33
 
33
- self._legacy_state['pending'].append({'by_index': {}})
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['pending'][-1]
37
+ return self._legacy_state["pending"][-1]
37
38
 
38
39
 
39
40
  def _legacy_current_row(self):
40
- return self._legacy_state['pending'][-1]
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 '$timestamp' not in row
46
- row['$timestamp'] = x
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)['by_index']
53
- _legacy_current_row(self)['by_index'][idx] = x
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)['by_index']
60
- _legacy_current_row(self)['by_index'][idx] = x
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)['by_index']
66
- _legacy_current_row(self)['by_index'][idx] = x
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)['by_index']
73
+ assert idx not in _legacy_current_row(self)["by_index"]
73
74
 
74
- _legacy_current_row(self)['by_index'][idx] = x
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)['by_index']
81
+ assert idx not in _legacy_current_row(self)["by_index"]
81
82
 
82
- _legacy_current_row(self)['by_index'][idx] = x
83
+ _legacy_current_row(self)["by_index"][idx] = x
83
84
 
84
85
 
85
86
  def _legacy_push(self):
86
- if 'pending' not in self._legacy_state:
87
+ if "pending" not in self._legacy_state:
87
88
  # Extremely likely default case, no "old" rows
88
89
  return
89
90
 
90
- assert 'table' in self._legacy_state
91
- table = self._legacy_state['table']
91
+ assert "table" in self._legacy_state
92
+ table = self._legacy_state["table"]
92
93
 
93
94
  # Some useful constants
94
- dtype_by_ctype = {quasardb.ColumnType.Double: np.dtype('float64'),
95
- quasardb.ColumnType.Int64: np.dtype('int64'),
96
- quasardb.ColumnType.Timestamp: np.dtype('datetime64[ns]'),
97
- quasardb.ColumnType.String: np.dtype('unicode'),
98
- quasardb.ColumnType.Symbol: np.dtype('unicode'),
99
- quasardb.ColumnType.Blob: np.dtype('bytes')
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 = {'$timestamp': [],
111
- 'by_index': {}}
112
+ pivoted = {"$timestamp": [], "by_index": {}}
112
113
  for i in all_idx:
113
- pivoted['by_index'][i] = []
114
+ pivoted["by_index"][i] = []
114
115
 
115
116
  # Do the actual pivot
116
- for row in self._legacy_state['pending']:
117
- assert '$timestamp' in row
118
- assert 'by_index' in row
117
+ for row in self._legacy_state["pending"]:
118
+ assert "$timestamp" in row
119
+ assert "by_index" in row
119
120
 
120
- pivoted['$timestamp'].append(row['$timestamp'])
121
+ pivoted["$timestamp"].append(row["$timestamp"])
121
122
 
122
- for idx in pivoted['by_index'].keys():
123
- val = row['by_index'].get(idx, None)
124
- pivoted['by_index'][idx].append(val)
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['by_index'].values():
130
- assert len(xs) == len(pivoted['$timestamp'])
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['by_index'].items():
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['$timestamp'])
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['$timestamp'], np.dtype('datetime64[ns]'))
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 = _legacy_start_row
184
- x.set_double = _legacy_set_double
185
- x.set_int64 = _legacy_set_int64
186
- x.set_string = _legacy_set_string
187
- x.set_blob = _legacy_set_blob
188
- x.set_timestamp = _legacy_set_timestamp
189
-
190
- x.push = _wrap_fn(x.push, _legacy_push)
191
- x.push_fast = _wrap_fn(x.push_fast, _legacy_push)
192
- x.push_async = _wrap_fn(x.push_async, _legacy_push)
193
- x.push_truncate = _wrap_fn(x.push_truncate, _legacy_push)
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('quasardb.firehose')
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 {'last': None,
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['$timestamp'], table_name)
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 = "SELECT * FROM \"{}\" IN RANGE ({}, {}) ".format(
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['last'])
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['transaction_id']
57
+ txid = tx["transaction_id"]
58
58
 
59
- if state['last'] is not None and tx['$timestamp'] > state['last']['$timestamp']:
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['seen'] = set()
64
-
65
- if txid not in state['seen']:
66
- xs = xs + _get_transaction_data(conn,
67
- table_name,
68
- tx['begin'],
69
- # The firehose logs transaction `end` span as
70
- # end inclusive, while our bulk reader and/or query
71
- # language are end exclusive.
72
- tx['end'] + np.timedelta64(1, 'ns'))
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['seen'].add(txid)
79
+ state["seen"].add(txid)
78
80
 
79
- state['last'] = tx
81
+ state["last"] = tx
80
82
 
81
83
  return (state, xs)
82
84
 
quasardb/libqdb_api.so CHANGED
Binary file