File tree Expand file tree Collapse file tree 1 file changed +16
-13
lines changed Expand file tree Collapse file tree 1 file changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -85,19 +85,6 @@ def query(self) -> str:
85
85
"""
86
86
return self ._query .replace ("\n " , " " ).replace (" " , " " )
87
87
88
- @staticmethod
89
- def get_switch_by_create_query (tokens : List [SQLToken ], index : int ) -> str :
90
- switch = tokens [index ].normalized + tokens [index + 1 ].normalized
91
-
92
- # Hive CREATE FUNCTION
93
- if any (
94
- index + i < len (tokens ) and tokens [index + i ].normalized == "FUNCTION"
95
- for i in (1 , 2 )
96
- ):
97
- switch = "CREATEFUNCTION"
98
-
99
- return switch
100
-
101
88
@property
102
89
def query_type (self ) -> str :
103
90
"""
@@ -1094,3 +1081,19 @@ def _flatten_sqlparse(self):
1094
1081
yield tok
1095
1082
else :
1096
1083
yield token
1084
+
1085
+ @staticmethod
1086
+ def _get_switch_by_create_query (tokens : List [SQLToken ], index : int ) -> str :
1087
+ """
1088
+ Return the switch that creates query type.
1089
+ """
1090
+ switch = tokens [index ].normalized + tokens [index + 1 ].normalized
1091
+
1092
+ # Hive CREATE FUNCTION
1093
+ if any (
1094
+ index + i < len (tokens ) and tokens [index + i ].normalized == "FUNCTION"
1095
+ for i in (1 , 2 )
1096
+ ):
1097
+ switch = "CREATEFUNCTION"
1098
+
1099
+ return switch
You can’t perform that action at this time.
0 commit comments