Skip to content

Commit

Permalink
Improve JSON parsing and type inference performance
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Howell committed May 1, 2015
1 parent 7ca70c1 commit 0bbc445
Show file tree
Hide file tree
Showing 3 changed files with 430 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ case class StructType(fields: Array[StructField]) extends DataType with Seq[Stru
throw new IllegalArgumentException(s"""Field "$name" does not exist."""))
}

private[sql] def getFieldIndex(name: String): Option[Int] = {
nameToIndex.get(name)
}

protected[sql] def toAttributes: Seq[AttributeReference] =
map(f => AttributeReference(f.name, f.dataType, f.nullable, f.metadata)())

Expand Down
Loading

0 comments on commit 0bbc445

Please sign in to comment.