This is an automated email from the ASF dual-hosted git repository.

gurwls223 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new 04550edd49e [SPARK-41708][SQL][TEST][FOLLOWUP] Match non-space chars 
in path string
04550edd49e is described below

commit 04550edd49ee587656d215e59d6a072772d7d5ec
Author: Wenchen Fan <[email protected]>
AuthorDate: Wed Feb 8 20:58:29 2023 +0900

    [SPARK-41708][SQL][TEST][FOLLOWUP] Match non-space chars in path string
    
    ### What changes were proposed in this pull request?
    
    This is a followup of https://github.com/apache/spark/pull/39610 . The 
non-greedy mode does not work well if the ending class name appears more than 
once, like `file://myPath/.../clsName/.../clsName`. We should still use greedy 
mode, but to match any chars that are not space or comma (comma is used to 
combine multiple paths in `FileIndex.toString`).
    
    ### Why are the changes needed?
    
    make the test framework more stable
    
    ### Does this PR introduce _any_ user-facing change?
    
    no
    
    ### How was this patch tested?
    
    N/A
    
    Closes #39924 from cloud-fan/minor.
    
    Authored-by: Wenchen Fan <[email protected]>
    Signed-off-by: Hyukjin Kwon <[email protected]>
---
 sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestHelper.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestHelper.scala 
b/sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestHelper.scala
index fbb38938031..25f39830906 100644
--- a/sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestHelper.scala
+++ b/sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestHelper.scala
@@ -41,7 +41,7 @@ trait SQLQueryTestHelper {
       .replaceAll(
         s"Location.*$clsName/",
         s"Location $notIncludedMsg/{warehouse_dir}/")
-      .replaceAll(s"file:.*?$clsName", s"file:$notIncludedMsg/{warehouse_dir}")
+      .replaceAll(s"file:[^\\s,]*$clsName", 
s"file:$notIncludedMsg/{warehouse_dir}")
       .replaceAll("Created By.*", s"Created By $notIncludedMsg")
       .replaceAll("Created Time.*", s"Created Time $notIncludedMsg")
       .replaceAll("Last Access.*", s"Last Access $notIncludedMsg")


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to