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

    https://github.com/apache/spark/pull/17060#discussion_r103070856
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala ---
    @@ -241,7 +243,8 @@ class SQLQueryTestSuite extends QueryTest with 
SharedSQLContext {
       private def listTestCases(): Seq[TestCase] = {
         listFilesRecursively(new File(inputFilePath)).map { file =>
           val resultFile = file.getAbsolutePath.replace(inputFilePath, 
goldenFilePath) + ".out"
    -      TestCase(file.getName, file.getAbsolutePath, resultFile)
    +      val absPath = file.getAbsolutePath
    +      TestCase(absPath.stripPrefix(inputFilePath + File.separator), 
absPath, resultFile)
    --- End diff --
    
    Does this get into problems where inputFilePath might already have a 
trailing separator and then isn't a prefix? maybe it can't happen, but maybe 
it's easier to strip leading separators from the final result, directly, if 
that's what you mean to do.


---
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