Skip to content

Commit a5a541d

Browse files
sander-goossusodapop
authored andcommitted
Rename package and service name for command exec
Updates the proto's, servers and clients to use the name as agreed upon. - [x] Regular CI - [x] Manual python tests - [x] Python driver local tests Author: Sander Goos <sander.goos@databricks.com>
1 parent 2df0e05 commit a5a541d

File tree

11 files changed

+197
-197
lines changed

11 files changed

+197
-197
lines changed
File renamed without changes.

cmdexec/clients/python/src/dbsql/connector/__init__.py renamed to cmdexec/clients/python/src/databricks/sql/__init__.py

File renamed without changes.

cmdexec/clients/python/src/dbsql/connector/api/__init__.py renamed to cmdexec/clients/python/src/databricks/sql/api/__init__.py

File renamed without changes.

cmdexec/clients/python/src/dbsql/connector/api/messages_pb2.py renamed to cmdexec/clients/python/src/databricks/sql/api/messages_pb2.py

Lines changed: 155 additions & 155 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmdexec/clients/python/src/dbsql/connector/api/messages_pb2_grpc.py renamed to cmdexec/clients/python/src/databricks/sql/api/messages_pb2_grpc.py

File renamed without changes.

cmdexec/clients/python/src/dbsql/connector/api/sql_cmd_service_pb2.py renamed to cmdexec/clients/python/src/databricks/sql/api/sql_cmd_service_pb2.py

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmdexec/clients/python/src/dbsql/connector/api/sql_cmd_service_pb2_grpc.py renamed to cmdexec/clients/python/src/databricks/sql/api/sql_cmd_service_pb2_grpc.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"""Client and server classes corresponding to protobuf-defined services."""
33
import grpc
44

5-
from dbsql.connector.api import messages_pb2 as cmdexec_dot_api_dot_proto_dot_messages__pb2
5+
from databricks.sql.api import messages_pb2 as cmdexec_dot_api_dot_proto_dot_messages__pb2
66

77

88
class SqlCommandServiceStub(object):
@@ -17,49 +17,49 @@ def __init__(self, channel):
1717
channel: A grpc.Channel.
1818
"""
1919
self.OpenSession = channel.unary_unary(
20-
'/com.databricks.cmdexec.SqlCommandService/OpenSession',
20+
'/databricks.sql.SqlCommandService/OpenSession',
2121
request_serializer=cmdexec_dot_api_dot_proto_dot_messages__pb2.OpenSessionRequest.
2222
SerializeToString,
2323
response_deserializer=cmdexec_dot_api_dot_proto_dot_messages__pb2.OpenSessionResponse.
2424
FromString,
2525
)
2626
self.CloseSession = channel.unary_unary(
27-
'/com.databricks.cmdexec.SqlCommandService/CloseSession',
27+
'/databricks.sql.SqlCommandService/CloseSession',
2828
request_serializer=cmdexec_dot_api_dot_proto_dot_messages__pb2.CloseSessionRequest.
2929
SerializeToString,
3030
response_deserializer=cmdexec_dot_api_dot_proto_dot_messages__pb2.CloseSessionResponse.
3131
FromString,
3232
)
3333
self.GetSessionInfo = channel.unary_unary(
34-
'/com.databricks.cmdexec.SqlCommandService/GetSessionInfo',
34+
'/databricks.sql.SqlCommandService/GetSessionInfo',
3535
request_serializer=cmdexec_dot_api_dot_proto_dot_messages__pb2.GetSessionInfoRequest.
3636
SerializeToString,
3737
response_deserializer=cmdexec_dot_api_dot_proto_dot_messages__pb2.
3838
GetSessionInfoResponse.FromString,
3939
)
4040
self.ExecuteCommand = channel.unary_unary(
41-
'/com.databricks.cmdexec.SqlCommandService/ExecuteCommand',
41+
'/databricks.sql.SqlCommandService/ExecuteCommand',
4242
request_serializer=cmdexec_dot_api_dot_proto_dot_messages__pb2.ExecuteCommandRequest.
4343
SerializeToString,
4444
response_deserializer=cmdexec_dot_api_dot_proto_dot_messages__pb2.
4545
ExecuteCommandResponse.FromString,
4646
)
4747
self.GetCommandStatus = channel.unary_unary(
48-
'/com.databricks.cmdexec.SqlCommandService/GetCommandStatus',
48+
'/databricks.sql.SqlCommandService/GetCommandStatus',
4949
request_serializer=cmdexec_dot_api_dot_proto_dot_messages__pb2.GetCommandStatusRequest.
5050
SerializeToString,
5151
response_deserializer=cmdexec_dot_api_dot_proto_dot_messages__pb2.
5252
GetCommandStatusResponse.FromString,
5353
)
5454
self.FetchCommandResults = channel.unary_unary(
55-
'/com.databricks.cmdexec.SqlCommandService/FetchCommandResults',
55+
'/databricks.sql.SqlCommandService/FetchCommandResults',
5656
request_serializer=cmdexec_dot_api_dot_proto_dot_messages__pb2.
5757
FetchCommandResultsRequest.SerializeToString,
5858
response_deserializer=cmdexec_dot_api_dot_proto_dot_messages__pb2.
5959
FetchCommandResultsResponse.FromString,
6060
)
6161
self.CloseCommand = channel.unary_unary(
62-
'/com.databricks.cmdexec.SqlCommandService/CloseCommand',
62+
'/databricks.sql.SqlCommandService/CloseCommand',
6363
request_serializer=cmdexec_dot_api_dot_proto_dot_messages__pb2.CloseCommandRequest.
6464
SerializeToString,
6565
response_deserializer=cmdexec_dot_api_dot_proto_dot_messages__pb2.CloseCommandResponse.
@@ -184,8 +184,8 @@ def add_SqlCommandServiceServicer_to_server(servicer, server):
184184
SerializeToString,
185185
),
186186
}
187-
generic_handler = grpc.method_handlers_generic_handler(
188-
'com.databricks.cmdexec.SqlCommandService', rpc_method_handlers)
187+
generic_handler = grpc.method_handlers_generic_handler('databricks.sql.SqlCommandService',
188+
rpc_method_handlers)
189189
server.add_generic_rpc_handlers((generic_handler, ))
190190

191191

@@ -207,7 +207,7 @@ def OpenSession(request,
207207
timeout=None,
208208
metadata=None):
209209
return grpc.experimental.unary_unary(
210-
request, target, '/com.databricks.cmdexec.SqlCommandService/OpenSession',
210+
request, target, '/databricks.sql.SqlCommandService/OpenSession',
211211
cmdexec_dot_api_dot_proto_dot_messages__pb2.OpenSessionRequest.SerializeToString,
212212
cmdexec_dot_api_dot_proto_dot_messages__pb2.OpenSessionResponse.FromString, options,
213213
channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout,
@@ -225,7 +225,7 @@ def CloseSession(request,
225225
timeout=None,
226226
metadata=None):
227227
return grpc.experimental.unary_unary(
228-
request, target, '/com.databricks.cmdexec.SqlCommandService/CloseSession',
228+
request, target, '/databricks.sql.SqlCommandService/CloseSession',
229229
cmdexec_dot_api_dot_proto_dot_messages__pb2.CloseSessionRequest.SerializeToString,
230230
cmdexec_dot_api_dot_proto_dot_messages__pb2.CloseSessionResponse.FromString, options,
231231
channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout,
@@ -243,7 +243,7 @@ def GetSessionInfo(request,
243243
timeout=None,
244244
metadata=None):
245245
return grpc.experimental.unary_unary(
246-
request, target, '/com.databricks.cmdexec.SqlCommandService/GetSessionInfo',
246+
request, target, '/databricks.sql.SqlCommandService/GetSessionInfo',
247247
cmdexec_dot_api_dot_proto_dot_messages__pb2.GetSessionInfoRequest.SerializeToString,
248248
cmdexec_dot_api_dot_proto_dot_messages__pb2.GetSessionInfoResponse.FromString, options,
249249
channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout,
@@ -261,7 +261,7 @@ def ExecuteCommand(request,
261261
timeout=None,
262262
metadata=None):
263263
return grpc.experimental.unary_unary(
264-
request, target, '/com.databricks.cmdexec.SqlCommandService/ExecuteCommand',
264+
request, target, '/databricks.sql.SqlCommandService/ExecuteCommand',
265265
cmdexec_dot_api_dot_proto_dot_messages__pb2.ExecuteCommandRequest.SerializeToString,
266266
cmdexec_dot_api_dot_proto_dot_messages__pb2.ExecuteCommandResponse.FromString, options,
267267
channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout,
@@ -279,7 +279,7 @@ def GetCommandStatus(request,
279279
timeout=None,
280280
metadata=None):
281281
return grpc.experimental.unary_unary(
282-
request, target, '/com.databricks.cmdexec.SqlCommandService/GetCommandStatus',
282+
request, target, '/databricks.sql.SqlCommandService/GetCommandStatus',
283283
cmdexec_dot_api_dot_proto_dot_messages__pb2.GetCommandStatusRequest.SerializeToString,
284284
cmdexec_dot_api_dot_proto_dot_messages__pb2.GetCommandStatusResponse.FromString,
285285
options, channel_credentials, insecure, call_credentials, compression, wait_for_ready,
@@ -297,7 +297,7 @@ def FetchCommandResults(request,
297297
timeout=None,
298298
metadata=None):
299299
return grpc.experimental.unary_unary(
300-
request, target, '/com.databricks.cmdexec.SqlCommandService/FetchCommandResults',
300+
request, target, '/databricks.sql.SqlCommandService/FetchCommandResults',
301301
cmdexec_dot_api_dot_proto_dot_messages__pb2.FetchCommandResultsRequest.SerializeToString,
302302
cmdexec_dot_api_dot_proto_dot_messages__pb2.FetchCommandResultsResponse.FromString,
303303
options, channel_credentials, insecure, call_credentials, compression, wait_for_ready,
@@ -315,7 +315,7 @@ def CloseCommand(request,
315315
timeout=None,
316316
metadata=None):
317317
return grpc.experimental.unary_unary(
318-
request, target, '/com.databricks.cmdexec.SqlCommandService/CloseCommand',
318+
request, target, '/databricks.sql.SqlCommandService/CloseCommand',
319319
cmdexec_dot_api_dot_proto_dot_messages__pb2.CloseCommandRequest.SerializeToString,
320320
cmdexec_dot_api_dot_proto_dot_messages__pb2.CloseCommandResponse.FromString, options,
321321
channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout,
File renamed without changes.
File renamed without changes.

cmdexec/clients/python/tests/test_fetches.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import pyarrow as pa
66

7-
import dbsql.connector.client as client
7+
import databricks.sql.client as client
88

99

1010
class FetchTests(unittest.TestCase):

0 commit comments

Comments
 (0)