@@ -212,7 +212,10 @@ def construct_one_data_frame(self):
212212 data_array = np .array (data_array , dtype = object )
213213 else :
214214 raise RuntimeError ("unsupported data type {}." .format (data_type ))
215- if data_array .dtype .byteorder == ">" :
215+ if (
216+ isinstance (data_array .dtype , np .dtype )
217+ and data_array .dtype .byteorder == ">"
218+ ):
216219 data_array = data_array .byteswap ().view (
217220 data_array .dtype .newbyteorder ("<" )
218221 )
@@ -355,7 +358,10 @@ def result_set_to_pandas(self):
355358 data_array = pd .Series (data_array ).apply (parse_int_to_date )
356359 else :
357360 raise RuntimeError ("unsupported data type {}." .format (data_type ))
358- if data_array .dtype .byteorder == ">" :
361+ if (
362+ isinstance (data_array .dtype , np .dtype )
363+ and data_array .dtype .byteorder == ">"
364+ ):
359365 data_array = data_array .byteswap ().view (
360366 data_array .dtype .newbyteorder ("<" )
361367 )
@@ -382,7 +388,7 @@ def result_set_to_pandas(self):
382388 or data_type == 10
383389 or data_type == 9
384390 ):
385- tmp_array = np .full (total_length , None , dtype = data_array . dtype )
391+ tmp_array = np .full (total_length , None )
386392
387393 bitmap_buffer = self .__query_data_set .bitmapList [location ]
388394 buffer = _to_bitbuffer (bitmap_buffer )
0 commit comments