--- a/src/PythonHandler.h Sat Dec 15 00:36:14 2018 +0100
+++ b/src/PythonHandler.h Sat Dec 15 00:44:04 2018 +0100
@@ -77,6 +77,11 @@
if (arguments.size() == 2) {
relationNameRegEx = wregex(arguments[0]);
pythonCode = arguments[1];
+ // TODO: allow relation structure changes: if there are more arguments, the describe the output relation
+ // TODO: allow also other modes:
+ // - insert additional records
+ // - process whole relation at once (can do e.g. some aggregations)
+ // - process whole stream at once (can do e.g. some joins or unions)
} else {
PyMem_RawFree(pythonProgramName);
throw cli::RelpipeCLIException(L"Usage: relpipe-tr-python <relationNameRegExp> <pythonCode>", cli::CLI::EXIT_CODE_UNKNOWN_COMMAND);
@@ -119,6 +124,7 @@
pyDict = PyModule_GetDict(pyModule);
for (int i = 0; i < currentRecord.size(); i++) {
+ // TODO: pass particular data-types to Python, not only strings
PyObject* pyValue = PyUnicode_FromString(convertor.to_bytes(currentRecord[i]).c_str());
PyList_SetItem(pyRecord, i, pyValue);
string_t attributeName = currentWriterMetadata[i].attributeName;