MCPcopy Create free account
hub / github.com/apache/madlib / _clean_operator

Method _clean_operator

src/madpack/upgrade_util.py:1136–1146  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1134 @brief Remove "drop/create operator" statements in the sql script
1135 """
1136 def _clean_operator(self):
1137 # remove 'drop operator'
1138 pattern = re.compile('DROP\s+OPERATOR.*?PROCEDURE\s+=.*?;', re.DOTALL | re.IGNORECASE)
1139 self._sql = re.sub(pattern, '', self._sql)
1140
1141 # for create operator statements:
1142 # delete: unchanged, removed (not in the input sql anyway)
1143 # keep: new, changed
1144 for p in self._unchanged_operator_patterns:
1145 regex_pat = re.compile(p, re.DOTALL | re.IGNORECASE)
1146 self._sql = re.sub(regex_pat, '', self._sql)
1147
1148 """
1149 @brief Remove "drop/create operator class" statements in the sql script

Callers 1

cleanupMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected