14
14
from .thrift import Client as ThriftClient
15
15
from . import omnisci_backend
16
16
from .omnisci_backend import (
17
- OmnisciArrayType , OmnisciBytesType , OmnisciTextEncodingDictType ,
17
+ OmnisciArrayType , OmnisciTextEncodingNoneType , OmnisciTextEncodingDictType ,
18
18
OmnisciOutputColumnType , OmnisciColumnType ,
19
19
OmnisciCompilerPipeline , OmnisciCursorType ,
20
20
BufferMeta , OmnisciColumnListType , OmnisciTableFunctionManagerType )
@@ -389,7 +389,6 @@ def add(a, b):
389
389
typesystem_aliases = dict (
390
390
bool = 'bool8' ,
391
391
Array = 'OmnisciArrayType' ,
392
- Bytes = 'OmnisciBytesType<char8>' ,
393
392
Cursor = 'OmnisciCursorType' ,
394
393
Column = 'OmnisciColumnType' ,
395
394
OutputColumn = 'OmnisciOutputColumnType' ,
@@ -399,6 +398,7 @@ def add(a, b):
399
398
Constant = 'int32|sizer=Constant' ,
400
399
PreFlight = 'int32|sizer=PreFlight' ,
401
400
ColumnList = 'OmnisciColumnListType' ,
401
+ TextEncodingNone = 'OmnisciTextEncodingNoneType' ,
402
402
TextEncodingDict = 'OmnisciTextEncodingDictType' ,
403
403
TableFunctionManager = 'OmnisciTableFunctionManagerType<>' ,
404
404
UDTF = 'int32|kind=UDTF'
@@ -849,7 +849,7 @@ def _get_ext_arguments_map(self):
849
849
'GeoPolygon' : typemap ['TExtArgumentType' ].get ('GeoPolygon' ),
850
850
'GeoMultiPolygon' : typemap ['TExtArgumentType' ].get (
851
851
'GeoMultiPolygon' ),
852
- 'Bytes ' : typemap ['TExtArgumentType' ].get ('TextEncodingNone' ),
852
+ 'TextEncodingNone ' : typemap ['TExtArgumentType' ].get ('TextEncodingNone' ),
853
853
'TextEncodingDict' : typemap ['TExtArgumentType' ].get ('TextEncodingDict' ),
854
854
'ColumnList<bool>' : typemap ['TExtArgumentType' ].get ('ColumnListBool' ),
855
855
'ColumnList<int8_t>' : typemap ['TExtArgumentType' ].get ('ColumnListInt8' ),
@@ -894,7 +894,8 @@ def _get_ext_arguments_map(self):
894
894
ext_arguments_map ['OmnisciOutputColumnListType<%s>' % ptr_type ] \
895
895
= ext_arguments_map .get ('ColumnList<%s>' % T )
896
896
897
- ext_arguments_map ['OmnisciBytesType<char8>' ] = ext_arguments_map .get ('Bytes' )
897
+ ext_arguments_map ['OmnisciTextEncodingNoneType<char8>' ] = \
898
+ ext_arguments_map .get ('TextEncodingNone' )
898
899
899
900
values = list (ext_arguments_map .values ())
900
901
for v , n in thrift .TExtArgumentType ._VALUES_TO_NAMES .items ():
@@ -1260,7 +1261,7 @@ def _register(self):
1260
1261
else :
1261
1262
skipped_names .append (udtf .name )
1262
1263
if self .debug :
1263
- print (f'Skipping: { ", " .join (skipped_names )} ' )
1264
+ print (f'Skipping: [ { ", " .join (skipped_names )} ] ' )
1264
1265
# Make sure that all registered functions have
1265
1266
# implementations, otherwise, we will crash the server.
1266
1267
for f in udtfs :
@@ -1397,8 +1398,8 @@ def format_type(self, typ: typesystem.Type):
1397
1398
elif isinstance (typ , OmnisciCursorType ):
1398
1399
p = tuple (map (self .format_type , typ [0 ]))
1399
1400
typ = typesystem .Type (('Cursor' ,) + p , ** typ ._params )
1400
- elif isinstance (typ , OmnisciBytesType ):
1401
- typ = typ .copy ().params (typename = 'Bytes ' )
1401
+ elif isinstance (typ , OmnisciTextEncodingNoneType ):
1402
+ typ = typ .copy ().params (typename = 'TextEncodingNone ' )
1402
1403
use_typename = True
1403
1404
elif isinstance (typ , OmnisciTextEncodingDictType ):
1404
1405
typ = typ .copy ().params (typename = 'TextEncodingDict' )
@@ -1443,7 +1444,7 @@ def remote_call(self, func, ftype: typesystem.Type, arguments: tuple, hold=False
1443
1444
1444
1445
if isinstance (atype , (OmnisciColumnType , OmnisciColumnListType )):
1445
1446
args .append (f'CURSOR({ a } )' )
1446
- elif isinstance (atype , OmnisciBytesType ):
1447
+ elif isinstance (atype , OmnisciTextEncodingNoneType ):
1447
1448
if isinstance (a , bytes ):
1448
1449
a = repr (a .decode ())
1449
1450
elif isinstance (a , str ):
0 commit comments