e6data-python-connector 2.0.2__tar.gz → 2.0.4__tar.gz
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.
- {e6data-python-connector-2.0.2/e6data_python_connector.egg-info → e6data-python-connector-2.0.4}/PKG-INFO +2 -2
- {e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4}/README.md +1 -1
- {e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4}/e6data_python_connector/datainputstream.py +17 -11
- {e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4}/e6data_python_connector/e6data_grpc.py +1 -1
- {e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4/e6data_python_connector.egg-info}/PKG-INFO +2 -2
- {e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4}/setup.py +1 -1
- {e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4}/LICENSE +0 -0
- {e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4}/MANIFEST.in +0 -0
- {e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4}/e6data_python_connector/__init__.py +0 -0
- {e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4}/e6data_python_connector/common.py +0 -0
- {e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4}/e6data_python_connector/constants.py +0 -0
- {e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4}/e6data_python_connector/date_time_utils.py +0 -0
- {e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4}/e6data_python_connector/dialect.py +0 -0
- {e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4}/e6data_python_connector/e6x_vector/__init__.py +0 -0
- {e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4}/e6data_python_connector/e6x_vector/constants.py +0 -0
- {e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4}/e6data_python_connector/e6x_vector/ttypes.py +0 -0
- {e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4}/e6data_python_connector/exceptions.py +0 -0
- {e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4}/e6data_python_connector/server/QueryEngineService.py +0 -0
- {e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4}/e6data_python_connector/server/__init__.py +0 -0
- {e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4}/e6data_python_connector/server/constants.py +0 -0
- {e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4}/e6data_python_connector/server/e6x_engine_pb2.py +0 -0
- {e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4}/e6data_python_connector/server/e6x_engine_pb2.pyi +0 -0
- {e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4}/e6data_python_connector/server/e6x_engine_pb2_grpc.py +0 -0
- {e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4}/e6data_python_connector/server/ttypes.py +0 -0
- {e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4}/e6data_python_connector/typeId.py +0 -0
- {e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4}/e6data_python_connector.egg-info/SOURCES.txt +0 -0
- {e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4}/e6data_python_connector.egg-info/dependency_links.txt +0 -0
- {e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4}/e6data_python_connector.egg-info/entry_points.txt +0 -0
- {e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4}/e6data_python_connector.egg-info/requires.txt +0 -0
- {e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4}/e6data_python_connector.egg-info/top_level.txt +0 -0
- {e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4}/pyproject.toml +0 -0
- {e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: e6data-python-connector
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.4
|
|
4
4
|
Summary: Client for the e6data distributed SQL Engine.
|
|
5
5
|
Home-page: https://github.com/e6x-labs/e6data-python-connector
|
|
6
6
|
Author: Uniphi, Inc.
|
|
@@ -27,7 +27,7 @@ Requires-Dist: sqlalchemy
|
|
|
27
27
|
|
|
28
28
|
# e6data Python Connector
|
|
29
29
|
|
|
30
|
-

|
|
31
31
|
|
|
32
32
|
## Introduction
|
|
33
33
|
|
|
@@ -24,6 +24,10 @@ except ImportError:
|
|
|
24
24
|
_logger = logging.getLogger(__name__)
|
|
25
25
|
|
|
26
26
|
|
|
27
|
+
def get_null(vector: Vector, index: int):
|
|
28
|
+
return vector.nullSet[0] if vector.isConstantVector else vector.nullSet[index]
|
|
29
|
+
|
|
30
|
+
|
|
27
31
|
class DataInputStream:
|
|
28
32
|
def __init__(self, stream):
|
|
29
33
|
self.stream = stream
|
|
@@ -203,14 +207,14 @@ def get_column_from_chunk(vector: Vector) -> list:
|
|
|
203
207
|
try:
|
|
204
208
|
if d_type == VectorType.LONG:
|
|
205
209
|
for row in range(vector.size):
|
|
206
|
-
if vector
|
|
210
|
+
if get_null(vector, row):
|
|
207
211
|
value_array.append(None)
|
|
208
212
|
continue
|
|
209
213
|
value_array.append(vector.data.int64Data.data[
|
|
210
214
|
row] if not vector.isConstantVector else vector.data.numericConstantData.data)
|
|
211
215
|
elif d_type == VectorType.DATE:
|
|
212
216
|
for row in range(vector.size):
|
|
213
|
-
if vector
|
|
217
|
+
if get_null(vector, row):
|
|
214
218
|
value_array.append(None)
|
|
215
219
|
continue
|
|
216
220
|
epoch_seconds = floor_div(vector.data.dateData.data[
|
|
@@ -221,54 +225,56 @@ def get_column_from_chunk(vector: Vector) -> list:
|
|
|
221
225
|
value_array.append(date.strftime("%Y-%m-%d"))
|
|
222
226
|
elif d_type == VectorType.DATETIME:
|
|
223
227
|
for row in range(vector.size):
|
|
224
|
-
if vector
|
|
228
|
+
if get_null(vector, row):
|
|
225
229
|
value_array.append(None)
|
|
226
230
|
continue
|
|
227
|
-
epoch_micros = vector.data.timeData.data[
|
|
231
|
+
epoch_micros = vector.data.timeData.data[
|
|
232
|
+
row] if not vector.isConstantVector else vector.data.timeConstantData.data
|
|
228
233
|
epoch_seconds = floor_div(epoch_micros, 1000_000)
|
|
229
234
|
micros_of_the_day = floor_mod(epoch_micros, 1000_000)
|
|
230
|
-
zone_offset = pytz.timezone('UTC') if vector.zoneOffset == 'Z' else pytz.timezone(
|
|
235
|
+
zone_offset = pytz.timezone('UTC') if vector.zoneOffset == 'Z' else pytz.timezone(
|
|
236
|
+
get_zone(vector.zoneOffset))
|
|
231
237
|
date_time = datetime.fromtimestamp(epoch_seconds, zone_offset)
|
|
232
238
|
date_time = date_time + timedelta(microseconds=micros_of_the_day)
|
|
233
239
|
value_array.append(date_time.strftime("%Y-%m-%d %H:%M:%S"))
|
|
234
240
|
elif d_type == VectorType.STRING or d_type == VectorType.ARRAY or d_type == VectorType.MAP or d_type == VectorType.STRUCT:
|
|
235
241
|
for row in range(vector.size):
|
|
236
|
-
if vector
|
|
242
|
+
if get_null(vector, row):
|
|
237
243
|
value_array.append(None)
|
|
238
244
|
continue
|
|
239
245
|
value_array.append(vector.data.varcharData.data[
|
|
240
246
|
row] if not vector.isConstantVector else vector.data.varcharConstantData.data)
|
|
241
247
|
elif d_type == VectorType.DOUBLE:
|
|
242
248
|
for row in range(vector.size):
|
|
243
|
-
if vector
|
|
249
|
+
if get_null(vector, row):
|
|
244
250
|
value_array.append(None)
|
|
245
251
|
continue
|
|
246
252
|
value_array.append(vector.data.float64Data.data[
|
|
247
253
|
row] if not vector.isConstantVector else vector.data.numericDecimalConstantData.data)
|
|
248
254
|
elif d_type == VectorType.BINARY:
|
|
249
255
|
for row in range(vector.size):
|
|
250
|
-
if vector
|
|
256
|
+
if get_null(vector, row):
|
|
251
257
|
value_array.append(None)
|
|
252
258
|
continue
|
|
253
259
|
value_array.append(vector.data.varcharData.data[
|
|
254
260
|
row] if not vector.isConstantVector else vector.data.varcharConstantData.data)
|
|
255
261
|
elif d_type == VectorType.FLOAT:
|
|
256
262
|
for row in range(vector.size):
|
|
257
|
-
if vector
|
|
263
|
+
if get_null(vector, row):
|
|
258
264
|
value_array.append(None)
|
|
259
265
|
continue
|
|
260
266
|
value_array.append(vector.data.float32Data.data[
|
|
261
267
|
row] if not vector.isConstantVector else vector.data.numericDecimalConstantData.data)
|
|
262
268
|
elif d_type == VectorType.BOOLEAN:
|
|
263
269
|
for row in range(vector.size):
|
|
264
|
-
if vector
|
|
270
|
+
if get_null(vector, row):
|
|
265
271
|
value_array.append(None)
|
|
266
272
|
continue
|
|
267
273
|
value_array.append(vector.data.boolData.data[
|
|
268
274
|
row] if not vector.isConstantVector else vector.data.boolConstantData.data)
|
|
269
275
|
elif d_type == VectorType.INTEGER:
|
|
270
276
|
for row in range(vector.size):
|
|
271
|
-
if vector
|
|
277
|
+
if get_null(vector, row):
|
|
272
278
|
value_array.append(None)
|
|
273
279
|
continue
|
|
274
280
|
value_array.append(vector.data.int32Data.data[
|
|
@@ -454,6 +454,7 @@ class Cursor(DBAPICursor):
|
|
|
454
454
|
get_result_metadata_response = self.connection.client.getResultMetadata(result_meta_data_request)
|
|
455
455
|
buffer = BytesIO(get_result_metadata_response.resultMetaData)
|
|
456
456
|
self._rowcount, self._query_columns_description = get_query_columns_info(buffer)
|
|
457
|
+
self._is_metadata_updated = True
|
|
457
458
|
|
|
458
459
|
def _fetch_more(self):
|
|
459
460
|
batch_size = self._arraysize
|
|
@@ -497,7 +498,6 @@ class Cursor(DBAPICursor):
|
|
|
497
498
|
buffer = get_next_result_batch_response.resultBatch
|
|
498
499
|
if not self._is_metadata_updated:
|
|
499
500
|
self.update_mete_data()
|
|
500
|
-
self._is_metadata_updated = True
|
|
501
501
|
if not buffer or len(buffer) == 0:
|
|
502
502
|
return None
|
|
503
503
|
# one batch retrieves the predefined set of rows
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: e6data-python-connector
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.4
|
|
4
4
|
Summary: Client for the e6data distributed SQL Engine.
|
|
5
5
|
Home-page: https://github.com/e6x-labs/e6data-python-connector
|
|
6
6
|
Author: Uniphi, Inc.
|
|
@@ -27,7 +27,7 @@ Requires-Dist: sqlalchemy
|
|
|
27
27
|
|
|
28
28
|
# e6data Python Connector
|
|
29
29
|
|
|
30
|
-

|
|
31
31
|
|
|
32
32
|
## Introduction
|
|
33
33
|
|
|
File without changes
|
|
File without changes
|
{e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4}/e6data_python_connector/__init__.py
RENAMED
|
File without changes
|
{e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4}/e6data_python_connector/common.py
RENAMED
|
File without changes
|
{e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4}/e6data_python_connector/constants.py
RENAMED
|
File without changes
|
|
File without changes
|
{e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4}/e6data_python_connector/dialect.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{e6data-python-connector-2.0.2 → e6data-python-connector-2.0.4}/e6data_python_connector/typeId.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|