Skip to content

Improve DataFrame arithmetic implementation #6762

Closed
@asmirnov82

Description

@asmirnov82

The main goals of this Issue are:

  1. To simplify the code related to all Element Wise comparison operations
  2. Make consistent return types for all PrimitiveColumnContainer.BinaryOperations
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions