Description
The main goals of this Issue are:
- To simplify the code related to all Element Wise comparison operations
- Make consistent return types for all PrimitiveColumnContainer.BinaryOperations
- To avoid unnecessary memory copying and type conversion
Currently all Elementwise comparison operations are defined to have a return type as one of method parameters:
void Operation ( ... , PrimitiveColumnContainer<bool> ret);
to correctly create this parameter the caller has to the container by himself. In current implementation cloning of the existing column with changing it's type is widely used:
PrimitiveDataFrameColumn<bool> retboolColumn = CloneAsBooleanColumn();
_columnContainer.Operation( ..., retboolColumn._columnContainer);
Cloning of column of any type as Boolean Column is error-prone and potentialy may lead to unnecessary memory copying and speed decreasing.
Possible solution is to change the signature of all Element Wise internal methods to correctly return required results and to create required objects inside the method, also make consistent retun type of PrimitiveColumnContainer for all PrimitiveColumnContainer.BinaryOperations (currently comparison operations return DataFrameColumn as other operation returns ColumnContainer)
Only internal or private method's signatures are proposed to be changed. Public API should not be affected