Github user ericl commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15521#discussion_r83919788
  
    --- Diff: 
sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveMetadataCacheSuite.scala 
---
    @@ -91,6 +95,19 @@ class HiveMetadataCacheSuite extends QueryTest with 
SQLTestUtils with TestHiveSi
                 // Test refreshing the cache.
                 spark.catalog.refreshTable("test")
                 assert(sql("select * from test").count() == 4)
    +            assert(spark.table("test").inputFiles.length == 4)
    +
    +            // Test refresh by path separately since it goes through 
different code paths than
    +            // refreshTable does.
    +            deleteRandomFile()
    +            spark.catalog.cacheTable("test")
    +            spark.catalog.refreshByPath("/some-invalid-path")  // no-op
    +            val e2 = intercept[SparkException] {
    +              sql("select * from test").count()
    +            }
    +            assert(e2.getMessage.contains("FileNotFoundException"))
    +            spark.catalog.refreshByPath(dir.getAbsolutePath)
    --- End diff --
    
    Makes sense. To get the old behavior, they can also disable the feature 
flag.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to