-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support HeavyDB #447
Support HeavyDB #447
Conversation
Hi @pearu! Add at least one of the required labels to this PR Required labels are : deprecation, enhancement, bug, documentation, tests, notebook |
Could we automatically switch to heavyai when the server version is greater than |
I guess we can. Since omniscidb and heavydb use different |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work, pearu. I wonder if it makes sense to rename the rbc/tests/*_omnisci_*
test files and specific functions:
rbc.externals.omniscidb
->rbc.externals.heavydb
rbc.omnisci_backend
->rbc.heavy_backend
rbc/omniscidb.py
Outdated
def get_heavydb_version(host='localhost', port=6274, _cache={}): | ||
"""Acquires the version of heavydb server. | ||
""" | ||
if (host, port) in _cache: | ||
return _cache[host, port] | ||
thrift_content = ''' | ||
exception TMapDException { | ||
1: string error_msg | ||
} | ||
service Omnisci { | ||
string get_version() throws (1: TMapDException e) | ||
} | ||
''' | ||
client = ThriftClient( | ||
host=host, | ||
port=port, | ||
multiplexed=False, | ||
thrift_content=thrift_content, | ||
socket_timeout=60000) | ||
version = client(Omnisci=dict(get_version=()))['Omnisci']['get_version'] | ||
_cache[host, port] = version = parse_version(version) | ||
return version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is needed because at this point one cannot use heavyai.get_version()
, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. In fact, at the point when executing heavyai.get_version()
, we know what is the brand of heavydb but here we only know what is host:port
of the heavydb server.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition, if dbname
would be the same for different heavydb brands, we would not need this function.
Yes, see #451 |
To test rbc against HeavyDB (former OmnisciDB) server, defineHEAVYAI_BRAND
environment variable.WhenHEAVYAI_BRAND
is not defined or contains a valueomnisci
then rbc expects that OmniscDB 5.10.2 or older server is running.rbc detects HeavyDB brand using the server version information.