Github user liancheng commented on a diff in the pull request:
https://github.com/apache/spark/pull/8023#discussion_r36736799
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/sources/interfaces.scala ---
@@ -565,6 +565,7 @@ abstract class HadoopFsRelation
private[sql](maybePartitionSpec: Option[Partitio
filters: Array[Filter],
inputPaths: Array[String],
broadcastedConf: Broadcast[SerializableConfiguration]): RDD[Row] = {
+ refresh()
--- End diff --
Yeah, I agree. Basically it's impossible to
1. Create a temporary JSON table pointing to path `P`
2. Change the contents by arbitrary means without notifying the temporary
table
3. Read the table again and expect to get updated contents
In the old JSON relation implementation, the refreshing logic is done by
`TextInputFormat.listStatus()`, while the new `JSONRelation` relies on
`HadoopFsRelation`. We can use `SqlNewHadoopRDD` and override the input format
there to inject the `FileStatus` cache to avoid extra refreshing costs there.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]