e6data-python-connector 2.3.10rc3__tar.gz → 2.3.10rc4__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.
Files changed (77) hide show
  1. {e6data_python_connector-2.3.10rc3/e6data_python_connector.egg-info → e6data_python_connector-2.3.10rc4}/PKG-INFO +2 -2
  2. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/README.md +1 -1
  3. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/e6data_python_connector/e6data_grpc.py +51 -20
  4. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4/e6data_python_connector.egg-info}/PKG-INFO +2 -2
  5. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/setup.py +1 -1
  6. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/LICENSE +0 -0
  7. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/MANIFEST.in +0 -0
  8. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/e6data_python_connector/__init__.py +0 -0
  9. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/e6data_python_connector/cluster_manager.py +0 -0
  10. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/e6data_python_connector/cluster_server/__init__.py +0 -0
  11. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/e6data_python_connector/cluster_server/cluster_pb2.py +0 -0
  12. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/e6data_python_connector/cluster_server/cluster_pb2_grpc.py +0 -0
  13. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/e6data_python_connector/common.py +0 -0
  14. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/e6data_python_connector/constants.py +0 -0
  15. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/e6data_python_connector/datainputstream.py +0 -0
  16. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/e6data_python_connector/date_time_utils.py +0 -0
  17. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/e6data_python_connector/dialect.py +0 -0
  18. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/e6data_python_connector/e6x_vector/__init__.py +0 -0
  19. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/e6data_python_connector/e6x_vector/constants.py +0 -0
  20. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/e6data_python_connector/e6x_vector/ttypes.py +0 -0
  21. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/e6data_python_connector/exceptions.py +0 -0
  22. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/e6data_python_connector/server/QueryEngineService.py +0 -0
  23. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/e6data_python_connector/server/__init__.py +0 -0
  24. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/e6data_python_connector/server/constants.py +0 -0
  25. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/e6data_python_connector/server/e6x_engine_pb2.py +0 -0
  26. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/e6data_python_connector/server/e6x_engine_pb2.pyi +0 -0
  27. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/e6data_python_connector/server/e6x_engine_pb2_grpc.py +0 -0
  28. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/e6data_python_connector/server/ttypes.py +0 -0
  29. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/e6data_python_connector/strategy.py +0 -0
  30. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/e6data_python_connector/typeId.py +0 -0
  31. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/e6data_python_connector.egg-info/SOURCES.txt +0 -0
  32. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/e6data_python_connector.egg-info/dependency_links.txt +0 -0
  33. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/e6data_python_connector.egg-info/entry_points.txt +0 -0
  34. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/e6data_python_connector.egg-info/requires.txt +0 -0
  35. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/e6data_python_connector.egg-info/top_level.txt +0 -0
  36. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/pyproject.toml +0 -0
  37. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/setup.cfg +0 -0
  38. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/__init__.py +0 -0
  39. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/analyze_38_nines.py +0 -0
  40. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/analyze_all_cases.py +0 -0
  41. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/analyze_binary.py +0 -0
  42. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/analyze_correct_value.py +0 -0
  43. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/analyze_fields.py +0 -0
  44. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/check_decimal_errors.py +0 -0
  45. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/cleanup_test_files.py +0 -0
  46. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/debug_38_nines.py +0 -0
  47. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/debug_binary.py +0 -0
  48. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/final_test.py +0 -0
  49. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/move_tests.py +0 -0
  50. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/quick_test.py +0 -0
  51. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/test_38_nines.py +0 -0
  52. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/test_all_decimal128_cases.py +0 -0
  53. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/test_cluster_manager_efficiency.py +0 -0
  54. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/test_cluster_manager_none_strategy.py +0 -0
  55. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/test_cluster_manager_strategy.py +0 -0
  56. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/test_comprehensive.py +0 -0
  57. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/test_current_implementation.py +0 -0
  58. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/test_decimal128_binary_parsing.py +0 -0
  59. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/test_decimal128_parsing.py +0 -0
  60. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/test_fix.py +0 -0
  61. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/test_improved_parsing.py +0 -0
  62. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/test_known_case.py +0 -0
  63. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/test_manual_analysis.py +0 -0
  64. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/test_mock_server.py +0 -0
  65. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/test_multiprocessing_fix.py +0 -0
  66. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/test_new_implementation.py +0 -0
  67. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/test_specific_binary.py +0 -0
  68. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/test_strategy.py +0 -0
  69. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/test_strategy_logic.py +0 -0
  70. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/test_strategy_persistence_fix.py +0 -0
  71. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/test_strategy_sharing_fix.py +0 -0
  72. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/test_user_binary_value.py +0 -0
  73. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/tests.py +0 -0
  74. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/tests_grpc.py +0 -0
  75. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/validate_decimal128.py +0 -0
  76. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/validate_implementation.py +0 -0
  77. {e6data_python_connector-2.3.10rc3 → e6data_python_connector-2.3.10rc4}/test/verify_decimal_fix.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: e6data-python-connector
3
- Version: 2.3.10rc3
3
+ Version: 2.3.10rc4
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: e6data, Inc.
@@ -38,7 +38,7 @@ Dynamic: summary
38
38
 
39
39
  # e6data Python Connector
40
40
 
41
- ![version](https://img.shields.io/badge/version-2.3.10,rc3-blue.svg)
41
+ ![version](https://img.shields.io/badge/version-2.3.10,rc4-blue.svg)
42
42
 
43
43
  ## Introduction
44
44
 
@@ -1,6 +1,6 @@
1
1
  # e6data Python Connector
2
2
 
3
- ![version](https://img.shields.io/badge/version-2.3.10,rc3-blue.svg)
3
+ ![version](https://img.shields.io/badge/version-2.3.10,rc4-blue.svg)
4
4
 
5
5
  ## Introduction
6
6
 
@@ -80,10 +80,12 @@ def re_auth(func):
80
80
  if current_retry == max_retry:
81
81
  raise e
82
82
  if e.code() == grpc.StatusCode.INTERNAL and 'Access denied' in e.details():
83
+ _logger.debug(f'Re-authenticating due to {e}')
83
84
  time.sleep(0.2)
84
85
  self.connection.get_re_authenticate_session_id()
85
86
  elif 'status: 456' in e.details():
86
87
  # Strategy changed, clear cache and retry
88
+ _logger.debug(f'Re-authenticating due to status: 456')
87
89
  _clear_strategy_cache()
88
90
  # Force re-authentication which will detect new strategy
89
91
  self.connection.get_re_authenticate_session_id()
@@ -302,10 +304,18 @@ def _get_strategy_debug_info():
302
304
  }
303
305
 
304
306
 
305
- def _get_grpc_header(engine_ip=None, cluster=None, strategy=None):
307
+ def _get_grpc_header(engine_ip=None, cluster=None, strategy=None, session_id=None, request_type=None):
306
308
  """Generate gRPC metadata headers for the request."""
307
309
  # Use the strategy module's implementation
308
- return _get_strategy_header(engine_ip=engine_ip, cluster=cluster, strategy=strategy)
310
+ headers = _get_strategy_header(engine_ip=engine_ip, cluster=cluster, strategy=strategy)
311
+
312
+ # Log headers being sent if debug connections exist
313
+ if _debug_connections:
314
+ session_info = f", session: {session_id}" if session_id else ""
315
+ request_info = f" [{request_type}]" if request_type else ""
316
+ _strategy_debug_log(f"Sending headers{request_info}: strategy={strategy}, cluster={cluster}, engine_ip={engine_ip}{session_info}")
317
+
318
+ return headers
309
319
 
310
320
 
311
321
  def connect(*args, **kwargs):
@@ -546,7 +556,8 @@ class Connection(object):
546
556
  try:
547
557
  authenticate_response = self._client.authenticate(
548
558
  authenticate_request,
549
- metadata=_get_grpc_header(cluster=self.cluster_name, strategy=active_strategy)
559
+ metadata=_get_grpc_header(cluster=self.cluster_name, strategy=active_strategy,
560
+ session_id=self._session_id, request_type="authenticate")
550
561
  )
551
562
  self._session_id = authenticate_response.sessionId
552
563
  if not self._session_id:
@@ -597,7 +608,8 @@ class Connection(object):
597
608
  try:
598
609
  authenticate_response = self._client.authenticate(
599
610
  authenticate_request,
600
- metadata=_get_grpc_header(cluster=self.cluster_name, strategy=strategy)
611
+ metadata=_get_grpc_header(cluster=self.cluster_name, strategy=strategy,
612
+ session_id=None, request_type="authenticate")
601
613
  )
602
614
  self._session_id = authenticate_response.sessionId
603
615
  if self._session_id:
@@ -767,7 +779,8 @@ class Connection(object):
767
779
  )
768
780
  clear_response = self._client.clear(
769
781
  clear_request,
770
- metadata=_get_grpc_header(engine_ip=engine_ip, cluster=self.cluster_name, strategy=_get_active_strategy())
782
+ metadata=_get_grpc_header(engine_ip=engine_ip, cluster=self.cluster_name, strategy=_get_active_strategy(),
783
+ session_id=self.connection.get_session_id, request_type="clear")
771
784
  )
772
785
 
773
786
  # Check for new strategy in clear response
@@ -798,7 +811,8 @@ class Connection(object):
798
811
  )
799
812
  cancel_response = self._client.cancelQuery(
800
813
  cancel_query_request,
801
- metadata=_get_grpc_header(engine_ip=engine_ip, cluster=self.cluster_name, strategy=_get_active_strategy())
814
+ metadata=_get_grpc_header(engine_ip=engine_ip, cluster=self.cluster_name, strategy=_get_active_strategy(),
815
+ session_id=self._session_id, request_type="query_cancel")
802
816
  )
803
817
 
804
818
  # Check for new strategy in cancel response
@@ -822,7 +836,8 @@ class Connection(object):
822
836
  )
823
837
  dry_run_response = self._client.dryRun(
824
838
  dry_run_request,
825
- metadata=_get_grpc_header(cluster=self.cluster_name, strategy=_get_active_strategy())
839
+ metadata=_get_grpc_header(cluster=self.cluster_name, strategy=_get_active_strategy(),
840
+ session_id=self.get_session_id, request_type="dry_run")
826
841
  )
827
842
  return dry_run_response.dryrunValue
828
843
 
@@ -844,7 +859,8 @@ class Connection(object):
844
859
  )
845
860
  get_table_response = self._client.getTablesV2(
846
861
  get_table_request,
847
- metadata=_get_grpc_header(cluster=self.cluster_name, strategy=_get_active_strategy())
862
+ metadata=_get_grpc_header(cluster=self.cluster_name, strategy=_get_active_strategy(),
863
+ session_id=self.get_session_id, request_type="get_tables")
848
864
  )
849
865
 
850
866
  # Check for new strategy in get tables response
@@ -872,7 +888,8 @@ class Connection(object):
872
888
  )
873
889
  get_columns_response = self._client.getColumnsV2(
874
890
  get_columns_request,
875
- metadata=_get_grpc_header(cluster=self.cluster_name, strategy=_get_active_strategy())
891
+ metadata=_get_grpc_header(cluster=self.cluster_name, strategy=_get_active_strategy(),
892
+ session_id=self.get_session_id, request_type="get_columns")
876
893
  )
877
894
 
878
895
  # Check for new strategy in get columns response
@@ -896,7 +913,8 @@ class Connection(object):
896
913
  )
897
914
  get_schema_response = self._client.getSchemaNamesV2(
898
915
  get_schema_request,
899
- metadata=_get_grpc_header(cluster=self.cluster_name, strategy=_get_active_strategy())
916
+ metadata=_get_grpc_header(cluster=self.cluster_name, strategy=_get_active_strategy(),
917
+ session_id=self.get_session_id, request_type="get_schema")
900
918
  )
901
919
 
902
920
  # Check for new strategy in get schema names response
@@ -983,10 +1001,12 @@ class Cursor(DBAPICursor):
983
1001
  """Reset state about the previous query in preparation for running another query"""
984
1002
  pass
985
1003
 
986
- @property
987
- def metadata(self):
1004
+ def _get_metadata(self, request_type="query_operation"):
988
1005
  """
989
- Get the gRPC metadata for the current query.
1006
+ Get the gRPC metadata for the current query with specific request type.
1007
+
1008
+ Args:
1009
+ request_type (str): The type of request being made
990
1010
 
991
1011
  Returns:
992
1012
  list: A list of tuples containing gRPC metadata.
@@ -999,7 +1019,18 @@ class Cursor(DBAPICursor):
999
1019
  strategy = self.connection._session_strategy
1000
1020
  else:
1001
1021
  strategy = _get_active_strategy()
1002
- return _get_grpc_header(engine_ip=self._engine_ip, cluster=self.connection.cluster_name, strategy=strategy)
1022
+ return _get_grpc_header(engine_ip=self._engine_ip, cluster=self.connection.cluster_name, strategy=strategy,
1023
+ session_id=self.connection.get_session_id, request_type=request_type)
1024
+
1025
+ @property
1026
+ def metadata(self):
1027
+ """
1028
+ Get the gRPC metadata for the current query.
1029
+
1030
+ Returns:
1031
+ list: A list of tuples containing gRPC metadata.
1032
+ """
1033
+ return self._get_metadata("query_operation")
1003
1034
 
1004
1035
  @property
1005
1036
  def arraysize(self):
@@ -1141,7 +1172,7 @@ class Cursor(DBAPICursor):
1141
1172
  )
1142
1173
  # Get fresh client after session access (may have been invalidated)
1143
1174
  client = self.connection.client
1144
- clear_response = client.clearOrCancelQuery(clear_request, metadata=self.metadata)
1175
+ clear_response = client.clearOrCancelQuery(clear_request, metadata=self._get_metadata("clear_or_cancel"))
1145
1176
 
1146
1177
  # Check for new strategy in clear response
1147
1178
  if hasattr(clear_response, 'new_strategy') and clear_response.new_strategy:
@@ -1199,7 +1230,7 @@ class Cursor(DBAPICursor):
1199
1230
  queryId=query_id,
1200
1231
  engineIP=self._engine_ip
1201
1232
  )
1202
- status_response = self.connection.client.status(status_request, metadata=self.metadata)
1233
+ status_response = self.connection.client.status(status_request, metadata=self._get_metadata("status"))
1203
1234
 
1204
1235
  # Check for new strategy in status response
1205
1236
  if hasattr(status_response, 'new_strategy') and status_response.new_strategy:
@@ -1240,7 +1271,7 @@ class Cursor(DBAPICursor):
1240
1271
  client = self.connection.client
1241
1272
  prepare_statement_response = client.prepareStatement(
1242
1273
  prepare_statement_request,
1243
- metadata=self.metadata
1274
+ metadata=self._get_metadata("prepare_statement")
1244
1275
  )
1245
1276
 
1246
1277
  self._query_id = prepare_statement_response.queryId
@@ -1266,7 +1297,7 @@ class Cursor(DBAPICursor):
1266
1297
  client = self.connection.client
1267
1298
  execute_response = client.executeStatement(
1268
1299
  execute_statement_request,
1269
- metadata=self.metadata
1300
+ metadata=self._get_metadata("execute_statement")
1270
1301
  )
1271
1302
 
1272
1303
  # Check for new strategy in execute response
@@ -1285,7 +1316,7 @@ class Cursor(DBAPICursor):
1285
1316
  client = self.connection.client
1286
1317
  prepare_statement_response = client.prepareStatementV2(
1287
1318
  prepare_statement_request,
1288
- metadata=self.metadata,
1319
+ metadata=self._get_metadata("prepare_statement_v2"),
1289
1320
  timeout=self.connection.grpc_prepare_timeout
1290
1321
  )
1291
1322
 
@@ -1313,7 +1344,7 @@ class Cursor(DBAPICursor):
1313
1344
  client = self.connection.client
1314
1345
  execute_response = client.executeStatementV2(
1315
1346
  execute_statement_request,
1316
- metadata=self.metadata
1347
+ metadata=self._get_metadata("execute_statement_v2")
1317
1348
  )
1318
1349
 
1319
1350
  # Check for new strategy in execute response
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: e6data-python-connector
3
- Version: 2.3.10rc3
3
+ Version: 2.3.10rc4
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: e6data, Inc.
@@ -38,7 +38,7 @@ Dynamic: summary
38
38
 
39
39
  # e6data Python Connector
40
40
 
41
- ![version](https://img.shields.io/badge/version-2.3.10,rc3-blue.svg)
41
+ ![version](https://img.shields.io/badge/version-2.3.10,rc4-blue.svg)
42
42
 
43
43
  ## Introduction
44
44
 
@@ -12,7 +12,7 @@
12
12
 
13
13
  import setuptools
14
14
 
15
- VERSION = (2, 3, 10, 'rc3')
15
+ VERSION = (2, 3, 10, 'rc4')
16
16
 
17
17
 
18
18
  def get_long_desc():