Skip to content

Commit

Permalink
Update Thrift to 4.8 with namespacing (#252)
Browse files Browse the repository at this point in the history
* Swap Thrift files for namespaced

* Switch thrift references

* Fix flake8

* Fix setup files
  • Loading branch information
Randy Zwitch authored Jul 23, 2019
1 parent 36f7333 commit 777a26f
Show file tree
Hide file tree
Showing 34 changed files with 1,012 additions and 519 deletions.
7 changes: 0 additions & 7 deletions common/constants.py

This file was deleted.

7 changes: 0 additions & 7 deletions completion_hints/constants.py

This file was deleted.

7 changes: 0 additions & 7 deletions mapd/constants.py

This file was deleted.

Empty file added omnisci/__init__.py
Empty file.
File renamed without changes.
14 changes: 14 additions & 0 deletions omnisci/common/constants.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion common/ttypes.py → omnisci/common/ttypes.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
14 changes: 14 additions & 0 deletions omnisci/completion_hints/constants.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 16 additions & 2 deletions mapd/MapD-remote → omnisci/mapd/MapD-remote
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ else:
from thrift.transport import TTransport, TSocket, TSSLSocket, THttpClient
from thrift.protocol.TBinaryProtocol import TBinaryProtocol

from mapd import MapD
from mapd.ttypes import *
from omnisci.mapd import MapD
from omnisci.mapd.ttypes import *

if len(sys.argv) <= 1 or sys.argv[1] == '--help':
print('')
Expand Down Expand Up @@ -103,6 +103,8 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help':
print(' bool has_object_privilege(TSessionId session, string granteeName, string ObjectName, TDBObjectType objectType, TDBObjectPermissions permissions)')
print(' TLicenseInfo set_license_key(TSessionId session, string key, string nonce)')
print(' TLicenseInfo get_license_claims(TSessionId session, string nonce)')
print(' get_device_parameters()')
print(' void register_runtime_udf(TSessionId session, string signatures, device_ir_map)')
print('')
sys.exit(0)

Expand Down Expand Up @@ -656,6 +658,18 @@ elif cmd == 'get_license_claims':
sys.exit(1)
pp.pprint(client.get_license_claims(eval(args[0]), args[1],))

elif cmd == 'get_device_parameters':
if len(args) != 0:
print('get_device_parameters requires 0 args')
sys.exit(1)
pp.pprint(client.get_device_parameters())

elif cmd == 'register_runtime_udf':
if len(args) != 3:
print('register_runtime_udf requires 3 args')
sys.exit(1)
pp.pprint(client.register_runtime_udf(eval(args[0]), args[1], eval(args[2]),))

else:
print('Unrecognized method %s' % cmd)
sys.exit(1)
Expand Down
Loading

0 comments on commit 777a26f

Please sign in to comment.