Skip to content

Commit

Permalink
fix naming
Browse files Browse the repository at this point in the history
  • Loading branch information
cloud-fan committed Nov 29, 2018
1 parent c411d17 commit 7387f05
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ object DataSourceV2Strategy extends Strategy {
val neededOutput = relation.output.filter(requiredColumns.contains)
if (neededOutput != relation.output) {
r.pruneColumns(neededOutput.toStructType)
val config = r.build()
val scan = r.build()
val nameToAttr = relation.output.map(_.name).zip(relation.output).toMap
config -> config.readSchema().toAttributes.map {
scan -> scan.readSchema().toAttributes.map {
// We have to keep the attribute id during transformation.
a => a.withExprId(nameToAttr(a.name).exprId)
}
Expand Down

0 comments on commit 7387f05

Please sign in to comment.