Skip to content
This repository was archived by the owner on Jan 20, 2022. It is now read-only.
This repository was archived by the owner on Jan 20, 2022. It is now read-only.

summingbird does not preserve equality on Producers #746

@johnynek

Description

@johnynek

due to the use of anonymous functions inside producer, if you have (p1, f1) == (p2, f2) you don't get p1.map(f1) == p2.map(f2). This frustrates the ability to memoize caching, which can in the worst case cause recomputation.

We are running a lot of issues like these down, but the solution we have come up with is to never use anonymous functions inside the planners and instead always use thinks like:

case class GetValue[K, V]() extends Function1[(K, V), V] {
  def apply(kv: (K, V)) = kv._2
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions