Skip to content

Commit d37bdeb

Browse files
Update heavydb to 6.2 and remove omniscidb 5.10 (#520)
* Update heavydb to 6.2 and remove omniscidb 5.10 * add clangxx to environment * update test * Fix test for heavydb 6.2 * flake8 * address reviewer comments
1 parent fd5da92 commit d37bdeb

10 files changed

Lines changed: 37 additions & 79 deletions

File tree

.github/workflows/rbc_test.yml

Lines changed: 12 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
os: [ubuntu-latest]
102102
python-version: ['3.10', '3.9', '3.8']
103103
numba-version: ['0.56', '0.55']
104-
heavydb-version: ['6.1', '6.0', '5.10']
104+
heavydb-version: ['6.2', '6.1', '6.0']
105105
heavydb-from: [conda]
106106
# include:
107107
# - os: ubuntu-latest
@@ -144,11 +144,7 @@ jobs:
144144
shell: bash -l {0}
145145
if: matrix.os == 'ubuntu-latest' && matrix.heavydb-from == 'conda'
146146
run: |
147-
if [[ ${{ matrix.heavydb-version }} == "5.10" ]]; then
148-
mamba create -n heavydb-env omniscidb=${{ matrix.heavydb-version }}*=*_cpu -c conda-forge
149-
else
150-
mamba create -n heavydb-env heavydb=${{ matrix.heavydb-version }}*=*_cpu -c conda-forge
151-
fi
147+
mamba create -n heavydb-env heavydb=${{ matrix.heavydb-version }}*=*_cpu -c conda-forge
152148
153149
- name: Build heavydb docker image and run it [docker]
154150
shell: bash -l {0}
@@ -173,20 +169,12 @@ jobs:
173169
shell: bash -l {0}
174170
if: matrix.os == 'ubuntu-latest' && matrix.heavydb-from == 'conda'
175171
run: |
176-
if [[ ${{ matrix.heavydb-version }} == "5.10" ]]; then
177-
mkdir data
178-
mamba run -n heavydb-env omnisci_initdb data -f
179-
mamba run -n heavydb-env omnisci_server --version
180-
RUN_FLAGS="--enable-runtime-udf --enable-table-functions --enable-dev-table-functions"
181-
mamba run -n heavydb-env omnisci_server $RUN_FLAGS &> heavydb-output.txt &
182-
else
183-
mkdir storage
184-
mamba run -n heavydb-env initheavy storage -f
185-
mamba run -n heavydb-env heavydb --version
186-
RUN_FLAGS="--enable-runtime-udfs --enable-table-functions --enable-dev-table-functions --enable-udf-registration-for-all-users"
187-
echo ${RUN_FLAGS}
188-
mamba run -n heavydb-env heavydb $RUN_FLAGS &> heavydb-output.txt &
189-
fi
172+
mkdir storage
173+
mamba run -n heavydb-env initheavy storage -f
174+
mamba run -n heavydb-env heavydb --version
175+
RUN_FLAGS="--enable-runtime-udfs --enable-table-functions --enable-dev-table-functions --enable-udf-registration-for-all-users"
176+
echo ${RUN_FLAGS}
177+
mamba run -n heavydb-env heavydb $RUN_FLAGS &> heavydb-output.txt &
190178
sleep 10
191179
192180
- name: Create rbc test environment v${{ matrix.python-version }}
@@ -243,15 +231,9 @@ jobs:
243231
shell: bash -l {0}
244232
if: failure() && matrix.os == 'ubuntu-latest' && matrix.heavydb-from == 'conda'
245233
run: |
246-
if [[ ${{ matrix.heavydb-version }} == "5.10" ]]; then
247-
mamba run -n heavydb-env cat data/mapd_log/omnisci_server.INFO
248-
mamba run -n heavydb-env cat data/mapd_log/omnisci_server.WARNING
249-
mamba run -n heavydb-env cat data/mapd_log/omnisci_server.ERROR
250-
else
251-
mamba run -n heavydb-env cat storage/mapd_log/heavydb.INFO
252-
mamba run -n heavydb-env cat storage/mapd_log/heavydb.WARNING
253-
mamba run -n heavydb-env cat storage/mapd_log/heavydb.ERROR
254-
fi
234+
mamba run -n heavydb-env cat storage/mapd_log/heavydb.INFO
235+
mamba run -n heavydb-env cat storage/mapd_log/heavydb.WARNING
236+
mamba run -n heavydb-env cat storage/mapd_log/heavydb.ERROR
255237
256238
- name: Show Heavydb docker logs on failure [docker]
257239
shell: bash -l {0}
@@ -265,11 +247,7 @@ jobs:
265247
continue-on-error: true
266248
if: matrix.os == 'ubuntu-latest' && matrix.heavydb-from == 'conda'
267249
run: |
268-
if [[ ${{ matrix.heavydb-version }} == "5.10" ]]; then
269-
mamba run -n heavydb-env killall omnisci_server
270-
else
271-
mamba run -n heavydb-env killall heavydb
272-
fi
250+
mamba run -n heavydb-env killall heavydb
273251
sleep 5
274252
275253
- name: Show Heavydb server output [conda]

environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ dependencies:
1515
- numba>=0.55
1616
- llvmlite
1717
- clang==11.1
18+
- clangxx==11.1
1819
- pytest
1920
- packaging
2021
- tblib

rbc/extension_functions.thrift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ namespace java com.mapd.thrift.calciteserver
33
/* See QueryEngine/ExtensionFunctionsWhitelist.h for required
44
values. It is ok if the following definition is out-of-date as
55
get_device_parameters will contain up-to-date mapping of type names
6-
and enum values [OmnisciDB >= 5.2]. */
6+
and enum values [heavydb >= 5.2]. */
77

88
enum TExtArgumentType {
99
Int8,

rbc/heavydb/remoteheavydb.py

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
from rbc import ctools, typesystem
3030

3131

32-
__all__ = ['RemoteHeavyDB', 'RemoteOmnisci', 'RemoteCallCapsule', 'is_available',
32+
__all__ = ['RemoteHeavyDB', 'RemoteCallCapsule', 'is_available',
3333
'type_to_type_name', 'get_client_config', 'global_heavydb_singleton']
3434

3535

@@ -95,8 +95,7 @@ def _global_heavydb():
9595
"""Implements singleton of a global RemoteHeavyDB instance.
9696
"""
9797
config = get_client_config()
98-
remotedb = dict(heavyai=RemoteHeavyDB,
99-
omnisci=RemoteHeavyDB)[config['dbname']](**config)
98+
remotedb = RemoteHeavyDB(**config)
10099
while True:
101100
yield remotedb
102101

@@ -105,7 +104,7 @@ def _global_heavydb():
105104

106105

107106
def is_available(_cache={}):
108-
"""Return version tuple and None if HeavyDB/OmnisciDB server is
107+
"""Return version tuple and None if HeavyDB server is
109108
accessible or recent enough. Otherwise return None and the reason
110109
about unavailability.
111110
"""
@@ -130,25 +129,22 @@ def get_client_config(**config):
130129
"""Retrieve the HeavyDB client configuration parameters from a client
131130
home directory.
132131
133-
Two HeavyDB brands (HEAVYDB_BRAND) are supported: heavyai and
134-
omnisci.
135-
136132
Note that here the client configurations parameters are those that
137133
are used to configure the client software such as rbc or pymapd.
138134
This is different from heavydb instance configuration described in
139135
https://docs.heavy.ai/installation-and-configuration/config-parameters
140136
that is used for configuring the heavydb server software.
141137
142138
In Linux clients, the HeavyDB client configuration is read from
143-
:code:`$HOME/.config/$HEAVYDB_BRAND/client.conf`
139+
:code:`$HOME/.config/heavyai/client.conf`
144140
145141
In Windows clients, the configuration is read from
146-
:code:`%UserProfile/.config/%HEAVYDB_BRAND%/client.conf` or
147-
:code:`%AllUsersProfile/.config/%HEAVYDB_BRAND%/client.conf`
142+
:code:`%UserProfile/.config/heavyai/client.conf` or
143+
:code:`%AllUsersProfile/.config/heavyai/client.conf`
148144
149-
When :code:`HEAVYDB_CLIENT_CONF` or :code:`OMNISCI_CLIENT_CONF`
150-
environment variable is defined then the configuration is read
151-
from the file specified in this variable.
145+
When :code:`HEAVYDB_CLIENT_CONF` environment variable is defined
146+
then the configuration is read from the file specified in
147+
this variable.
152148
153149
The configuration file must use configuration language similar to
154150
one used in MS Windows INI files. For HeavyDB client
@@ -161,7 +157,7 @@ def get_client_config(**config):
161157
[server]
162158
host: <HeavyDB server host name or IP, defaults to localhost>
163159
port: <HeavyDB server port, defaults to 6274>
164-
dbname: <HeavyDB database name, defaults to heavyai or omnisci>
160+
dbname: <HeavyDB database name, defaults to heavyai>
165161
166162
Parameters
167163
----------
@@ -182,8 +178,7 @@ def get_client_config(**config):
182178
config = _config
183179

184180
conf_file = None
185-
for brand, client_conf_env in [('heavyai', 'HEAVYDB_CLIENT_CONF'),
186-
('omnisci', 'OMNISCI_CLIENT_CONF')]:
181+
for brand, client_conf_env in [('heavyai', 'HEAVYDB_CLIENT_CONF')]:
187182
conf_file = os.environ.get(client_conf_env, None)
188183
if conf_file is not None and not os.path.isfile(conf_file):
189184
print('rbc.heavydb.get_client_config:'
@@ -264,7 +259,7 @@ def is_sizer(t):
264259

265260

266261
def get_sizer_enum(t):
267-
"""Return sizer enum value as defined by the omniscidb server.
262+
"""Return sizer enum value as defined by the heavydb server.
268263
"""
269264
sizer = t.annotation()['sizer']
270265
sizer = output_buffer_sizer_map.get(sizer or None, sizer)
@@ -1561,8 +1556,3 @@ def remote_call(self, func, ftype: typesystem.Type, arguments: tuple, hold=False
15611556
return numpy.array(list(result), dtype).view(numpy.recarray)
15621557
else:
15631558
return dtype[0][1](list(result)[0][0])
1564-
1565-
1566-
class RemoteOmnisci(RemoteHeavyDB):
1567-
"""Omnisci - the previous brand of HeavyAI
1568-
"""

rbc/omniscidb.py

Lines changed: 0 additions & 6 deletions
This file was deleted.

rbc/tests/heavydb/test_heavydb.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
pytestmark = pytest.mark.skipif(not available_version, reason=reason)
1313

1414

15-
@pytest.mark.parametrize("heavydb_brand", ['omnisci', 'heavyai'])
15+
@pytest.mark.parametrize("heavydb_brand", ['heavyai'])
1616
def test_get_client_config(tmpdir, heavydb_brand):
1717
d = tmpdir.mkdir(heavydb_brand)
1818
fh = d.join("client.conf")
@@ -34,8 +34,7 @@ def test_get_client_config(tmpdir, heavydb_brand):
3434
""")
3535
conf_file = os.path.join(fh.dirname, fh.basename)
3636

37-
client_conf_env = dict(heavyai='HEAVYDB_CLIENT_CONF',
38-
omnisci='OMNISCI_CLIENT_CONF')[heavydb_brand]
37+
client_conf_env = dict(heavyai='HEAVYDB_CLIENT_CONF')[heavydb_brand]
3938
old_conf = os.environ.get(client_conf_env)
4039
os.environ[client_conf_env] = conf_file
4140

rbc/tests/heavydb/test_text_encoding_dict.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ def test_getstring_lst(lst, unique, m, y):
106106
y[j] += len(col.string_dict_proxy.getString(j))
107107
return unique
108108

109+
if heavydb.version[:2] >= (6, 3):
109110
@heavydb('TextEncodingDict(RowFunctionManager, TextEncodingDict)', devices=['cpu'])
110111
def fn_copy(mgr, t):
111112
db_id = mgr.getDictDbId('fn_copy', 0)
@@ -499,8 +500,8 @@ def test_getString_lst(heavydb, col):
499500

500501
@pytest.mark.parametrize('col', ['t1'])
501502
def test_udf_copy_dict_encoded_string(heavydb, col):
502-
if heavydb.version[:2] < (6, 2):
503-
pytest.skip('Requires HeavyDB version 6.2 or newer')
503+
if heavydb.version[:2] < (6, 3):
504+
pytest.skip('Requires HeavyDB version 6.3 or newer')
504505

505506
table = f"{heavydb.base_name}text"
506507
query = f"SELECT fn_copy({col}) from {table}"
@@ -510,8 +511,8 @@ def test_udf_copy_dict_encoded_string(heavydb, col):
510511

511512

512513
def test_row_function_manager(heavydb):
513-
if heavydb.version[:2] < (6, 2):
514-
pytest.skip('Requires HeavyDB version 6.2 or newer')
514+
if heavydb.version[:2] < (6, 3):
515+
pytest.skip('Requires HeavyDB version 6.3 or newer')
515516

516517
@heavydb('int32(int32, RowFunctionManager)')
517518
def invalid_fn(a, mgr):

start_omniscidb_bg.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

utils/client_ssh_tunnel.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
# 1. Run omnscidb server with ssh port forwarding::
77
#
88
# ssh -L 6274:127.0.0.1:16274 <remote host name or IP>
9-
# bin/omnisci_server --enable-runtime-udf --enable-table-functions -p 16274 --http-port 16278 --calcite-port 16279
9+
# bin/heavydb --enable-runtime-udf --enable-table-functions -p 16274 --http-port 16278 --calcite-port 16279
1010
#
11-
# 2. Relate the omniscidb server to client:
11+
# 2. Relate the heavydb server to client:
1212
#
13-
# export OMNISCI_CLIENT_CONF=utils/client_ssh_tunnel.conf
13+
# export HEAVYDB_CLIENT_CONF=utils/client_ssh_tunnel.conf
1414
#
1515

1616
[server]

utils/scan_for_extern_C.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def process_folder(path):
8484

8585
def main():
8686
return
87-
rootdir = '/path/to/omniscidb-internal/'
87+
rootdir = '/path/to/heavydb-internal/'
8888
rootdir = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
8989

9090
symbols = set()

0 commit comments

Comments
 (0)