1
- '''Omnisci TextEncodingNone type that corresponds to Omnisci type TEXT ENCODED NONE.
1
+ '''HeavyDB TextEncodingNone type that corresponds to HeavyDB type TEXT ENCODED NONE.
2
2
'''
3
3
4
4
__all__ = ['TextEncodingNonePointer' , 'TextEncodingNone' , 'HeavyDBTextEncodingNoneType' ]
9
9
from rbc .errors import RequireLiteralValue
10
10
from .buffer import (
11
11
BufferPointer , Buffer , OmnisciBufferType ,
12
- omnisci_buffer_constructor )
12
+ heavydb_buffer_constructor )
13
13
from numba .core import types , extending , cgutils
14
14
from llvmlite import ir
15
15
from typing import Union
16
16
17
17
18
18
class HeavyDBTextEncodingNoneType (OmnisciBufferType ):
19
- """Omnisci TextEncodingNone type for RBC typesystem.
19
+ """HeavyDB TextEncodingNone type for RBC typesystem.
20
20
"""
21
21
22
22
@property
@@ -118,20 +118,20 @@ def impl(a, b):
118
118
119
119
120
120
@extending .lower_builtin (TextEncodingNone , types .Integer )
121
- def omnisci_text_encoding_none_constructor (context , builder , sig , args ):
122
- return omnisci_buffer_constructor (context , builder , sig , args )
121
+ def heavydb_text_encoding_none_constructor (context , builder , sig , args ):
122
+ return heavydb_buffer_constructor (context , builder , sig , args )
123
123
124
124
125
125
@extending .lower_builtin (TextEncodingNone , types .StringLiteral )
126
- def omnisci_text_encoding_none_constructor_literal (context , builder , sig , args ):
126
+ def heavydb_text_encoding_none_constructor_literal (context , builder , sig , args ):
127
127
int64_t = ir .IntType (64 )
128
128
int8_t_ptr = ir .IntType (8 ).as_pointer ()
129
129
130
130
literal_value = sig .args [0 ].literal_value
131
131
sz = int64_t (len (literal_value ))
132
132
133
133
# arr = {ptr, size, is_null}*
134
- arr = omnisci_buffer_constructor (context , builder , sig .return_type (types .int64 ), [sz ])
134
+ arr = heavydb_buffer_constructor (context , builder , sig .return_type (types .int64 ), [sz ])
135
135
ptr = builder .extract_value (builder .load (arr ), [0 ])
136
136
137
137
msg_bytes = literal_value .encode ('utf-8' )
@@ -144,7 +144,7 @@ def omnisci_text_encoding_none_constructor_literal(context, builder, sig, args):
144
144
145
145
146
146
@extending .type_callable (TextEncodingNone )
147
- def type_omnisci_text_encoding_none (context ):
147
+ def type_heavydb_text_encoding_none (context ):
148
148
def typer (arg ):
149
149
if isinstance (arg , types .UnicodeType ):
150
150
raise RequireLiteralValue ()
0 commit comments