Skip to content

Commit 0068cea

Browse files
change the logic just for post process map
1 parent 8163a9e commit 0068cea

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests_and_examples/run_query_tests.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,12 @@ def _append_timestamp_to_column_name(self, column):
147147
column -- Dictionary containing column data, such as "name" and
148148
"api-name".
149149
"""
150-
old_name = '{}'.format(column['api-name'])
150+
old_name = '"{}"'.format(column['api-name'])
151151

152152
timestamp = self._get_timestamp()
153153
column['name'] += timestamp
154154
column['api-name'] += timestamp
155-
new_name = '{}'.format(column['api-name'])
155+
new_name = '"{}"'.format(column['api-name'])
156156

157157
self.column_translation[old_name] = new_name
158158

@@ -254,10 +254,15 @@ def _translate_column_names(self, json_data):
254254
Return:
255255
JSON data with new column name.
256256
"""
257+
258+
def _translate_column_names(self, json_data):
257259
data_string = json.dumps(json_data)
258260

259261
for old_name, new_name in self.column_translation.items():
260262
data_string = data_string.replace(old_name, new_name)
263+
if "post-process" and "map" in data_string:
264+
column_map_name = '"time-series-integer-test-column'
265+
data_string = data_string.replace(column_map_name, new_name[:-1])
261266

262267
return json.loads(data_string)
263268

0 commit comments

Comments
 (0)