Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Delete some related yet dead code in AttributeMap.
  • Loading branch information
JoshRosen committed Jun 4, 2016
commit dd94e294c4bc197e800ccffe73defb56d2b2eba2
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@ object AttributeMap {
def apply[A](kvs: Seq[(Attribute, A)]): AttributeMap[A] = {
new AttributeMap(kvs.map(kv => (kv._1.exprId, kv)).toMap)
}

/** Given a schema, constructs an [[AttributeMap]] from [[Attribute]] to ordinal */
def byIndex(schema: Seq[Attribute]): AttributeMap[Int] = apply(schema.zipWithIndex)

/** Given a schema, constructs a map from ordinal to Attribute. */
def toIndex(schema: Seq[Attribute]): Map[Int, Attribute] =
schema.zipWithIndex.map { case (a, i) => i -> a }.toMap
}

class AttributeMap[A](baseMap: Map[ExprId, (Attribute, A)])
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was vaguely-related yet unused code that I stumbled across while looking for similar occurrences of this pattern, so I decided to remove it.

Expand Down