You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by gu...@apache.org on 2023/02/08 11:59:03 UTC
[spark] branch branch-3.4 updated: [SPARK-41708][SQL][TEST][FOLLOWUP] Match non-space chars in path string
This is an automated email from the ASF dual-hosted git repository.
gurwls223 pushed a commit to branch branch-3.4
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.4 by this push:
new 31d3a8addd4 [SPARK-41708][SQL][TEST][FOLLOWUP] Match non-space chars in path string
31d3a8addd4 is described below
commit 31d3a8addd424ba33ad3dc5f34cea1ca473a7bf6
Author: Wenchen Fan <we...@databricks.com>
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 <we...@databricks.com>
Signed-off-by: Hyukjin Kwon <gu...@apache.org>
(cherry picked from commit 04550edd49ee587656d215e59d6a072772d7d5ec)
Signed-off-by: Hyukjin Kwon <gu...@apache.org>
---
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: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org