featuretools icon indicating copy to clipboard operation
featuretools copied to clipboard

Spike: Improve Generics for Input Types in Primitives

Open gsheni opened this issue 4 years ago • 1 comments

Problem

  • Certain comparison primitives like Equal, NotEqual, EqualScalar, NotEqualScalar use the ColumnSchema base class in their allowed primitive inputs. This allows them to take accept any Logical Type as input. For the Equal case, the allowed input is defined this way:
    input_types = [ColumnSchema(), ColumnSchema()]
  • This means that valid input could be two numeric features, two text features, or even one text and one numeric feature.
  • But we only want to compare two numeric features, two text features. Not the third case.
  • We therefore need a way to link two primitive input types.

Request

  • This spike is to create a design document to possible solutions to this problem.

Related Docs

  • https://alteryx.atlassian.net/wiki/spaces/PS/pages/1034519162/Improving+Generic+Variable+Types+in+Primitives
  • https://github.com/alteryx/featuretools/issues/845
  • https://github.com/alteryx/featuretools/issues/842

gsheni avatar Sep 09 '21 22:09 gsheni

@davesque questions to answer in design doc:

  • Should nullability be a property of ColumnSchema?
  • Should we move to 1 Logical Type and nullability being a property? (ex - Integer and IntegerNullable)

Related issues:

  • https://github.com/alteryx/woodwork/issues/1121
  • https://github.com/alteryx/woodwork/issues/1106

gsheni avatar Nov 18 '21 22:11 gsheni