14
14
15
15
16
16
class SnowflakePandasData (PandasData ):
17
- @classmethod
18
- def convert_JSON (cls , s , dtype , pandas_type ):
19
- converter = cls .convert_JSON_element (dtype )
20
- return s .map (converter , na_action = "ignore" ).astype ("object" )
21
-
22
- convert_Struct = convert_Map = convert_JSON
23
-
24
17
@classmethod
25
18
def convert_Timestamp_element (cls , dtype ):
26
19
return datetime .datetime .fromisoformat
@@ -33,11 +26,25 @@ def convert_Date_element(cls, dtype):
33
26
def convert_Time_element (cls , dtype ):
34
27
return datetime .time .fromisoformat
35
28
29
+ @classmethod
30
+ def convert_JSON (cls , s , dtype , pandas_type ):
31
+ converter = cls .convert_JSON_element (dtype )
32
+ return s .map (converter , na_action = "ignore" ).astype ("object" )
33
+
36
34
@classmethod
37
35
def convert_Array (cls , s , dtype , pandas_type ):
38
36
raw_json_objects = cls .convert_JSON (s , dtype , pandas_type )
39
- converter = cls .get_element_converter (dtype .value_type )
40
- return raw_json_objects .map (converter , na_action = "ignore" )
37
+ return super ().convert_Array (raw_json_objects , dtype , pandas_type )
38
+
39
+ @classmethod
40
+ def convert_Map (cls , s , dtype , pandas_type ):
41
+ raw_json_objects = cls .convert_JSON (s , dtype , pandas_type )
42
+ return super ().convert_Map (raw_json_objects , dtype , pandas_type )
43
+
44
+ @classmethod
45
+ def convert_Struct (cls , s , dtype , pandas_type ):
46
+ raw_json_objects = cls .convert_JSON (s , dtype , pandas_type )
47
+ return super ().convert_Struct (raw_json_objects , dtype , pandas_type )
41
48
42
49
43
50
class SnowflakePyArrowData (PyArrowData ):
0 commit comments