e6data-python-connector 2.1.18__tar.gz → 2.1.20__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.1.18/e6data_python_connector.egg-info → e6data_python_connector-2.1.20}/PKG-INFO +2 -2
- {e6data-python-connector-2.1.18 → e6data_python_connector-2.1.20}/README.md +1 -1
- {e6data-python-connector-2.1.18 → e6data_python_connector-2.1.20}/e6data_python_connector/datainputstream.py +8 -7
- {e6data-python-connector-2.1.18 → e6data_python_connector-2.1.20}/e6data_python_connector/date_time_utils.py +5 -16
- e6data_python_connector-2.1.20/e6data_python_connector/e6x_vector/__init__.py +1 -0
- {e6data-python-connector-2.1.18/e6data_python_connector/server → e6data_python_connector-2.1.20/e6data_python_connector/e6x_vector}/constants.py +1 -1
- {e6data-python-connector-2.1.18 → e6data_python_connector-2.1.20}/e6data_python_connector/e6x_vector/ttypes.py +4 -1
- {e6data-python-connector-2.1.18 → e6data_python_connector-2.1.20/e6data_python_connector.egg-info}/PKG-INFO +2 -2
- {e6data-python-connector-2.1.18 → e6data_python_connector-2.1.20}/setup.py +1 -1
- e6data-python-connector-2.1.18/e6data_python_connector/e6x_vector/__init__.py +0 -1
- {e6data-python-connector-2.1.18 → e6data_python_connector-2.1.20}/LICENSE +0 -0
- {e6data-python-connector-2.1.18 → e6data_python_connector-2.1.20}/MANIFEST.in +0 -0
- {e6data-python-connector-2.1.18 → e6data_python_connector-2.1.20}/e6data_python_connector/__init__.py +0 -0
- {e6data-python-connector-2.1.18 → e6data_python_connector-2.1.20}/e6data_python_connector/common.py +0 -0
- {e6data-python-connector-2.1.18 → e6data_python_connector-2.1.20}/e6data_python_connector/constants.py +0 -0
- {e6data-python-connector-2.1.18 → e6data_python_connector-2.1.20}/e6data_python_connector/dialect.py +0 -0
- {e6data-python-connector-2.1.18 → e6data_python_connector-2.1.20}/e6data_python_connector/e6data_grpc.py +0 -0
- {e6data-python-connector-2.1.18 → e6data_python_connector-2.1.20}/e6data_python_connector/exceptions.py +0 -0
- {e6data-python-connector-2.1.18 → e6data_python_connector-2.1.20}/e6data_python_connector/server/QueryEngineService.py +0 -0
- {e6data-python-connector-2.1.18 → e6data_python_connector-2.1.20}/e6data_python_connector/server/__init__.py +0 -0
- {e6data-python-connector-2.1.18/e6data_python_connector/e6x_vector → e6data_python_connector-2.1.20/e6data_python_connector/server}/constants.py +0 -0
- {e6data-python-connector-2.1.18 → e6data_python_connector-2.1.20}/e6data_python_connector/server/e6x_engine_pb2.py +0 -0
- {e6data-python-connector-2.1.18 → e6data_python_connector-2.1.20}/e6data_python_connector/server/e6x_engine_pb2.pyi +0 -0
- {e6data-python-connector-2.1.18 → e6data_python_connector-2.1.20}/e6data_python_connector/server/e6x_engine_pb2_grpc.py +0 -0
- {e6data-python-connector-2.1.18 → e6data_python_connector-2.1.20}/e6data_python_connector/server/ttypes.py +0 -0
- {e6data-python-connector-2.1.18 → e6data_python_connector-2.1.20}/e6data_python_connector/typeId.py +0 -0
- {e6data-python-connector-2.1.18 → e6data_python_connector-2.1.20}/e6data_python_connector.egg-info/SOURCES.txt +0 -0
- {e6data-python-connector-2.1.18 → e6data_python_connector-2.1.20}/e6data_python_connector.egg-info/dependency_links.txt +0 -0
- {e6data-python-connector-2.1.18 → e6data_python_connector-2.1.20}/e6data_python_connector.egg-info/entry_points.txt +0 -0
- {e6data-python-connector-2.1.18 → e6data_python_connector-2.1.20}/e6data_python_connector.egg-info/requires.txt +0 -0
- {e6data-python-connector-2.1.18 → e6data_python_connector-2.1.20}/e6data_python_connector.egg-info/top_level.txt +0 -0
- {e6data-python-connector-2.1.18 → e6data_python_connector-2.1.20}/pyproject.toml +0 -0
- {e6data-python-connector-2.1.18 → e6data_python_connector-2.1.20}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: e6data-python-connector
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.20
|
|
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
|
|
|
@@ -205,7 +205,7 @@ def read_rows_from_chunk(query_columns_description: list, buffer):
|
|
|
205
205
|
def get_column_from_chunk(vector: Vector) -> list:
|
|
206
206
|
value_array = list()
|
|
207
207
|
d_type = vector.vectorType
|
|
208
|
-
zone =
|
|
208
|
+
zone = pytz.UTC
|
|
209
209
|
try:
|
|
210
210
|
if d_type == VectorType.LONG:
|
|
211
211
|
for row in range(vector.size):
|
|
@@ -222,8 +222,7 @@ def get_column_from_chunk(vector: Vector) -> list:
|
|
|
222
222
|
epoch_seconds = floor_div(vector.data.dateData.data[
|
|
223
223
|
row] if not vector.isConstantVector else vector.data.dateConstantData.data,
|
|
224
224
|
1000_000)
|
|
225
|
-
|
|
226
|
-
date = datetime.fromtimestamp(epoch_seconds, zone_offset)
|
|
225
|
+
date = datetime.fromtimestamp(epoch_seconds, zone)
|
|
227
226
|
value_array.append(date.strftime("%Y-%m-%d"))
|
|
228
227
|
elif d_type == VectorType.DATETIME:
|
|
229
228
|
for row in range(vector.size):
|
|
@@ -234,13 +233,12 @@ def get_column_from_chunk(vector: Vector) -> list:
|
|
|
234
233
|
row] if not vector.isConstantVector else vector.data.timeConstantData.data
|
|
235
234
|
if ((vector.isConstantVector and vector.data.timeConstantData.zoneData is not None) or
|
|
236
235
|
(not vector.isConstantVector and vector.data.timeData.zoneData is not None)):
|
|
237
|
-
|
|
236
|
+
zone_id = vector.data.timeData.zoneData[
|
|
238
237
|
row] if not vector.isConstantVector else vector.data.timeConstantData.zoneData
|
|
239
|
-
zone = timezone_from_offset(
|
|
238
|
+
zone = timezone_from_offset(zone_id)
|
|
240
239
|
epoch_seconds = floor_div(epoch_micros, 1000_000)
|
|
241
240
|
micros_of_the_day = floor_mod(epoch_micros, 1000_000)
|
|
242
|
-
|
|
243
|
-
date_time = datetime.fromtimestamp(epoch_seconds, zone_offset)
|
|
241
|
+
date_time = datetime.fromtimestamp(epoch_seconds, zone)
|
|
244
242
|
date_time = date_time + timedelta(microseconds=micros_of_the_day)
|
|
245
243
|
value_array.append(date_time.isoformat(timespec='milliseconds'))
|
|
246
244
|
elif d_type == VectorType.STRING or d_type == VectorType.ARRAY or d_type == VectorType.MAP or d_type == VectorType.STRUCT:
|
|
@@ -285,6 +283,9 @@ def get_column_from_chunk(vector: Vector) -> list:
|
|
|
285
283
|
continue
|
|
286
284
|
value_array.append(vector.data.int32Data.data[
|
|
287
285
|
row] if not vector.isConstantVector else vector.data.numericConstantData.data)
|
|
286
|
+
elif d_type == VectorType.NULL:
|
|
287
|
+
for row in range(vector.size):
|
|
288
|
+
value_array.append(None)
|
|
288
289
|
else:
|
|
289
290
|
value_array.append(None)
|
|
290
291
|
except Exception as e:
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
from datetime import datetime, timedelta
|
|
2
1
|
from typing import Final
|
|
3
2
|
import pytz
|
|
4
3
|
|
|
@@ -161,7 +160,7 @@ def floor_mod(x, y):
|
|
|
161
160
|
return r
|
|
162
161
|
|
|
163
162
|
|
|
164
|
-
def timezone_from_offset(offset_string) ->
|
|
163
|
+
def timezone_from_offset(offset_string) -> pytz:
|
|
165
164
|
# Parse the offset string into hours and minutes
|
|
166
165
|
sign = -1 if offset_string[0] == "-" else 1
|
|
167
166
|
if ":" in offset_string:
|
|
@@ -171,22 +170,12 @@ def timezone_from_offset(offset_string) -> str:
|
|
|
171
170
|
hours_minutes = with_out_sign.split(":")
|
|
172
171
|
hours = int(hours_minutes[0])
|
|
173
172
|
minutes = int(hours_minutes[1])
|
|
174
|
-
|
|
175
|
-
# Calculate the offset in seconds
|
|
176
173
|
total_minutes = (hours * 60 + minutes) * sign
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
now = datetime.now()
|
|
181
|
-
# Search for a timezone with the given offset
|
|
182
|
-
for tz_name in pytz.all_timezones:
|
|
183
|
-
tz = pytz.timezone(tz_name)
|
|
184
|
-
tz_offset = tz.utcoffset(now, is_dst=False)
|
|
185
|
-
if tz_offset == offset:
|
|
186
|
-
zone_map[offset_string] = tz_name
|
|
187
|
-
return tz_name
|
|
174
|
+
fixed_offset = pytz.FixedOffset(total_minutes)
|
|
175
|
+
zone_map[offset_string] = fixed_offset
|
|
176
|
+
return pytz.FixedOffset(total_minutes)
|
|
188
177
|
else:
|
|
189
|
-
return
|
|
178
|
+
return pytz.UTC if offset_string == 'Z' else pytz.timezone(offset_string)
|
|
190
179
|
|
|
191
180
|
|
|
192
181
|
def get_format(str_format):
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__all__ = ['ttypes', 'constants']
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
# Autogenerated by Thrift Compiler (0.
|
|
2
|
+
# Autogenerated by Thrift Compiler (0.20.0)
|
|
3
3
|
#
|
|
4
4
|
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
5
5
|
#
|
|
@@ -31,6 +31,7 @@ class VectorType(object):
|
|
|
31
31
|
STRUCT = 11
|
|
32
32
|
MAP = 12
|
|
33
33
|
ARRAY = 13
|
|
34
|
+
NULL = 14
|
|
34
35
|
|
|
35
36
|
_VALUES_TO_NAMES = {
|
|
36
37
|
0: "BINARY",
|
|
@@ -47,6 +48,7 @@ class VectorType(object):
|
|
|
47
48
|
11: "STRUCT",
|
|
48
49
|
12: "MAP",
|
|
49
50
|
13: "ARRAY",
|
|
51
|
+
14: "NULL",
|
|
50
52
|
}
|
|
51
53
|
|
|
52
54
|
_NAMES_TO_VALUES = {
|
|
@@ -64,6 +66,7 @@ class VectorType(object):
|
|
|
64
66
|
"STRUCT": 11,
|
|
65
67
|
"MAP": 12,
|
|
66
68
|
"ARRAY": 13,
|
|
69
|
+
"NULL": 14,
|
|
67
70
|
}
|
|
68
71
|
|
|
69
72
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: e6data-python-connector
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.20
|
|
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
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__all__ = ['ttypes', 'constants']
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{e6data-python-connector-2.1.18 → e6data_python_connector-2.1.20}/e6data_python_connector/common.py
RENAMED
|
File without changes
|
|
File without changes
|
{e6data-python-connector-2.1.18 → e6data_python_connector-2.1.20}/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
|
{e6data-python-connector-2.1.18 → e6data_python_connector-2.1.20}/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
|