Details
-
Task
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
1.0.16
-
None
-
None
Description
WriteEngine is riddled with the copy-pasted and somewhat excessive functionality.
Examples include:
- there are three functions to write values into blocks in writeengine/wrapper/we_colop.(h, cpp): writeRow, writeRows and writeRowsValues.
- there are two functions to insert values in writeengine/wrapper/writeengine: insertColumnRecs and insertColumnRec. Their functionality can be unified in insertColumnRecs (as inserting several rows can express insertion of one) but some of functionality is somewhat different and the reason for difference is not commented or otherwise documented.
- big part of functionality of write engine can and should be put into type handlers. There are too many cases where column width is used to compute block index, offset of data inside of block, sizes of temporary buffers and conversion of data to and from network format.
Of course, assumptions used in WE are deeply rooted everywhere in MCS, but to quote old Fortran manual "the value of PI should be made named constant in case its value will ever change". Centralization of concerns will help with implementation of new functionality and with maintenance of old features.