Github user gengliangwang commented on a diff in the pull request: https://github.com/apache/spark/pull/21004#discussion_r181283665 --- 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 -- I moved it here on purpose. So it may be avoid being created twice in the future. I am OK to inline it.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org