doki23 commented on PR #45181: URL: https://github.com/apache/spark/pull/45181#issuecomment-1979968619
Maybe [this](https://github.com/apache/spark/pull/45181#issuecomment-1969241145) is the proper solution. But we need find all the children of logicalPlan if they're cached: ```scala def queryExecution: QueryExecution = { val cacheManager = queryExecutionUnPersisted.sparkSession.sharedState.cacheManager val plan = queryExecutionUnPersisted.logical val findCachedFragment = plan.find({ case command: IgnoreCachedData => false case currentFragment => cacheManager.lookupCachedData(currentFragment).isEmpty }).isDefined if (findCachedFragment) queryExecutionUnPersisted else queryExecutionPersisted } ``` And I don't know the if it's binary compatible. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
