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

Add a method to prepare for optimizing FlatMapKeys #305

Merged
merged 6 commits into from Oct 24, 2013
Merged

Conversation

johnynek
Copy link
Collaborator

No description provided.

case _ => false
}

def isOutput[P <: Platform[P]](p: Producer[P, Any]): Boolean = p match {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TailProducer?

@johnynek
Copy link
Collaborator Author

@ryanlecompte how can we fix that? Sadly, the planner/optimizer loses types since otherwise we would need Producer to be an HList (a-la shapeless). TailProducer is not a case class, and is a sealed marker trait on producers that have some result.

@ianoc
Copy link
Collaborator

ianoc commented Oct 23, 2013

@johnynek in that particular case we don't need the type info kept anyway do we?

@ryanlecompte
Copy link
Contributor

Well, in this particular case you really only care about the fact that you may have a TailProducer, right? You could just write:

val neighborFn = { (p: Producer[P, Any]) => p match {
    case t: TailProducer[_, _] => Iterable.empty[Producer[P, Any]]
    case _ => graph(p)
  }
}

That would fix the 2.10 warning at least :-)

Conflicts:
	summingbird-core/src/main/scala/com/twitter/summingbird/Dependants.scala
/** Returns true if this node does not directly change the data (does not apply any transformation)
*/
def isNoOp[P <: Platform[P]](p: Producer[P, Any]): Boolean = p match {
case IdentityKeyedProducer(_) => true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style points for later: bunch up cases with case A(_) | B(_) => true

sritchie added a commit that referenced this pull request Oct 24, 2013
Add a method to prepare for optimizing FlatMapKeys
@sritchie sritchie merged commit 2a7059f into develop Oct 24, 2013
@sritchie sritchie deleted the transOutput branch October 24, 2013 02:29
snoble pushed a commit to snoble/summingbird that referenced this pull request Sep 8, 2017
…ormanceFix

Keeping the notion of lazily calculated heavy hitters, but fixing it to ...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants