Github user windpiger commented on a diff in the pull request: https://github.com/apache/spark/pull/17338#discussion_r106778719 --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala --- @@ -700,20 +701,33 @@ abstract class DDLSuite extends QueryTest with SQLTestUtils { test("create temporary view using") { val csvFile = - Thread.currentThread().getContextClassLoader.getResource("test-data/cars.csv").toString - withView("testview") { - sql(s"CREATE OR REPLACE TEMPORARY VIEW testview (c1 String, c2 String) USING " + - "org.apache.spark.sql.execution.datasources.csv.CSVFileFormat " + - s"OPTIONS (PATH '$csvFile')") + Thread.currentThread().getContextClassLoader.getResourceAsStream("test-data/cars.csv") --- End diff -- `getResourceAsStream` is used to read resource files from jar's resource, it is ok. the point is the return value not the relative path `test-data/cars.csv`
--- 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