ClickHouse/tests/integration/test_executable_dictionary/user_scripts/input_sum.py

13 lines
323 B
Python
Raw Normal View History

2021-12-25 13:34:17 +00:00
#!/usr/bin/python3
import sys
import re
if __name__ == "__main__":
2021-12-25 13:34:17 +00:00
for line in sys.stdin:
updated_line = line.replace("\n", "")
line_split = re.split(r"\t+", line)
2021-12-25 13:34:17 +00:00
sum = int(line_split[0]) + int(line_split[1])
print(updated_line + "\t" + str(sum), end="\n")
2021-12-25 13:34:17 +00:00
sys.stdout.flush()