Github user cloud-fan commented on a diff in the pull request: https://github.com/apache/spark/pull/21004#discussion_r181289458 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSource.scala --- @@ -95,6 +95,14 @@ case class DataSource( lazy val sourceInfo: SourceInfo = sourceSchema() private val caseInsensitiveOptions = CaseInsensitiveMap(options) private val equality = sparkSession.sessionState.conf.resolver + // The operations below are expensive therefore try not to do them if we don't need to, e.g., + // in streaming mode, we have already inferred and registered partition columns, we will + // never have to materialize the lazy val below + private lazy val tempFileIndex = { --- End diff -- let's just inline it. People can still create a new index in the future, technically this can't prevent users from doing that.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org