dongjoon-hyun commented on a change in pull request #30491:
URL: https://github.com/apache/spark/pull/30491#discussion_r530087552
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceV2Strategy.scala
##########
@@ -170,11 +170,13 @@ class DataSourceV2Strategy(session: SparkSession) extends
Strategy with Predicat
}
case AppendData(r: DataSourceV2Relation, query, writeOptions, _) =>
+ val refreshCache = () =>
session.sharedState.cacheManager.recacheByPlan(session, r)
r.table.asWritable match {
case v1 if v1.supports(TableCapability.V1_BATCH_WRITE) =>
- AppendDataExecV1(v1, writeOptions.asOptions, query, r) :: Nil
+ AppendDataExecV1(v1, writeOptions.asOptions, query, afterWrite =
refreshCache) :: Nil
Review comment:
Shall we omit `afterWrite = `?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]