Skip to content

Commit 2044a3a

Browse files
tupuipearuguilhermeleobas
authored
Refactor OmniSci to Heavy (#454)
Co-authored-by: Pearu Peterson <[email protected]> Co-authored-by: Guilherme Leobas <[email protected]>
1 parent c84a11a commit 2044a3a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+2693
-2683
lines changed

.github/workflows/rbc_test.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ jobs:
225225
EXPECTED_NUMBA_VERSION: ${{ matrix.numba-version }}
226226
RBC_TESTS_FULL: TRUE
227227
run: |
228-
mamba run -n rbc pytest -sv -r A rbc/tests/ -x -k omnisci
228+
mamba run -n rbc pytest -sv -r A rbc/tests/ -x -k heavyai
229229
230230
- name: Run rbc tests
231231
shell: bash -l {0}
@@ -236,7 +236,7 @@ jobs:
236236
EXPECTED_NUMBA_VERSION: ${{ matrix.numba-version }}
237237
RBC_TESTS_FULL: TRUE
238238
run: |
239-
mamba run -n rbc pytest -sv -r A rbc/tests/ -x -k omnisci
239+
mamba run -n rbc pytest -sv -r A rbc/tests/ -x -k heavyai
240240
241241
- name: Show Omniscidb conda logs on failure [conda]
242242
shell: bash -l {0}

rbc/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Expose a temporary prototype. It will be replaced by proper
22
# implementation soon.
33
from .remotejit import RemoteJIT # noqa: F401
4-
from .omniscidb import RemoteOmnisci # noqa: F401
4+
from .heavydb import RemoteHeavyDB # noqa: F401
55

66
from ._version import get_versions
77
__version__ = get_versions()['version']
File renamed without changes.

rbc/heavyai/__init__.py

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
from .array import * # noqa: F401, F403
2+
from .column import * # noqa: F401, F403
3+
from .bytes import * # noqa: F401, F403
4+
from .metatype import * # noqa: F401, F403
5+
from .text_encoding import * # noqa: F401, F403
6+
from .pipeline import * # noqa: F401, F403
7+
from .column_list import * # noqa: F401, F403
8+
from .table_function_manager import * # noqa: F401, F403
9+
10+
from . import mathimpl as math # noqa: F401
11+
from . import npyimpl as np # noqa: F401
12+
from . import python_operators as operators # noqa: F401
13+
14+
# initialize the array api
15+
from rbc.stdlib import array_api # noqa: F401
16+
17+
__all__ = [s for s in dir() if not s.startswith('_')]

rbc/omnisci_backend/omnisci_array.py rbc/heavyai/array.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
__all__ = ['ArrayPointer', 'Array', 'OmnisciArrayType']
55

66
from rbc import typesystem, errors
7-
from .omnisci_buffer import (BufferPointer, Buffer,
8-
OmnisciBufferType,
9-
omnisci_buffer_constructor)
7+
from .buffer import (BufferPointer, Buffer,
8+
OmnisciBufferType,
9+
omnisci_buffer_constructor)
1010
from numba.core import extending, types
1111
from typing import Union, TypeVar
1212

rbc/omnisci_backend/omnisci_buffer.py rbc/heavyai/buffer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
import operator
2727
from collections import defaultdict
28-
from .omnisci_metatype import OmnisciMetaType
28+
from .metatype import OmnisciMetaType
2929
from llvmlite import ir
3030
import numpy as np
3131
from rbc import typesystem, irutils
@@ -195,7 +195,7 @@ def omnisci_buffer_constructor(context, builder, sig, args):
195195
alloc_fn = irutils.get_or_insert_function(builder.module, alloc_fnty, alloc_fn_name)
196196
ptr8 = builder.call(alloc_fn, [element_count, element_size])
197197
# remember possible temporary allocations so that when leaving a
198-
# UDF/UDTF, these will be deallocated, see omnisci_pipeline.py.
198+
# UDF/UDTF, these will be deallocated, see pipeline.py.
199199
builder_buffers[builder].append(ptr8)
200200
ptr = builder.bitcast(ptr8, context.get_value_type(ptr_type))
201201

rbc/omnisci_backend/omnisci_bytes.py rbc/heavyai/bytes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
__all__ = ['BytesPointer', 'Bytes', 'OmnisciBytesType']
1212

1313
from rbc import typesystem
14-
from .omnisci_buffer import (
14+
from .buffer import (
1515
BufferPointer, Buffer, OmnisciBufferType,
1616
omnisci_buffer_constructor)
1717
from numba.core import types, extending

rbc/omnisci_backend/omnisci_column.py rbc/heavyai/column.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
from llvmlite import ir
1111
from rbc import typesystem, irutils
12-
from .omnisci_buffer import Buffer, OmnisciBufferType, BufferType
13-
from .omnisci_column_list import OmnisciColumnListType
12+
from .buffer import Buffer, OmnisciBufferType, BufferType
13+
from .column_list import OmnisciColumnListType
1414
from rbc.targetinfo import TargetInfo
1515
from numba.core import extending, types
1616

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

rbc/omnisci_backend/omnisci_pipeline.py rbc/heavyai/pipeline.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import operator
22

33
from rbc.errors import NumbaTypeError
4-
from .omnisci_buffer import BufferMeta, free_all_other_buffers
4+
from .buffer import BufferMeta, free_all_other_buffers
55
from numba.core import ir, types
66
from numba.core.compiler import CompilerBase, DefaultPassBuilder
77
from numba.core.compiler_machinery import FunctionPass, register_pass

rbc/omnisci_backend/python_operators.py rbc/heavyai/python_operators.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import operator
22
from llvmlite import ir
3-
from .omnisci_array import ArrayPointer, Array
3+
from .array import ArrayPointer, Array
44
from rbc import typesystem
55
from numba.core import extending, types
66

rbc/omnisci_backend/omnisci_text_encoding.py rbc/heavyai/text_encoding.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
__all__ = ['OmnisciTextEncodingDictType', 'TextEncodingDict']
55

6-
from .omnisci_metatype import OmnisciMetaType
6+
from .metatype import OmnisciMetaType
77
from rbc import typesystem
88

99

0 commit comments

Comments
 (0)