twitter/scalding — pull request #471 by koertkuipers (2013-06-25 19:55:12+00:00)
Title: make mode.openForRead work for taps with dynamic fields

for a simple tab-delimited file with headers a,b and c

before:
scala> import com.twitter.scalding._
scala> val source = new Tsv("/tmp/test", skipHeader=true)
scala> implicit val mode = new Local(true)
scala> val it = mode.openForRead(source.createTap(Read)(mode))
scala> it.getFields
res0: cascading.tuple.Fields = UNKNOWN

scala> implicit val mode = new Hdfs(true, new org.apache.hadoop.conf.Configuration())
scala> val it = mode.openForRead(source.createTap(Read)(mode))
scala> it.getFields
res1: cascading.tuple.Fields = UNKNOWN

after:
scala> import com.twitter.scalding._
scala> val source = new Tsv("/tmp/test", skipHeader=true)
scala> implicit val mode = new Local(true)
scala> val it = mode.openForRead(source.createTap(Read)(mode))
scala> it.getFields
res0: cascading.tuple.Fields = 'a b c'

scala> implicit val mode = new Hdfs(true, new org.apache.hadoop.conf.Configuration())
scala> val it = mode.openForRead(source.createTap(Read)(mode))
scala> it.getFields
res1: cascading.tuple.Fields = 'a b c'