You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "wangyum (via GitHub)" <gi...@apache.org> on 2025/08/07 10:54:13 UTC
[PR] [SPARK-53173][SQL][TESTS] Improve the regex pattern in the replaceNotIncludedMsg method [spark]
wangyum opened a new pull request, #51901:
URL: https://github.com/apache/spark/pull/51901
### What changes were proposed in this pull request?
This PR improves the regex pattern in the `replaceNotIncludedMsg` method. Replace `Owner\t.*` with `Owner.*` to match the owner info.
### Why are the changes needed?
Improve the test.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Set current user and run test:
<img width="551" height="387" alt="image" src="https://github.com/user-attachments/assets/32040d58-b673-4bea-b046-1f9e89b6b9d8" />
```shell
SPARK_GENERATE_GOLDEN_FILES=1 build/sbt "sql/testOnly org.apache.spark.sql.SQLQueryTestSuite -- -z create_view.sql"
```
Before this PR:
<img width="351" height="173" alt="image" src="https://github.com/user-attachments/assets/78dc575a-c572-433e-a26a-760e1d2fc738" />
After this PR:
<img width="361" height="181" alt="image" src="https://github.com/user-attachments/assets/22d5d76d-c71b-40ca-a04f-01a80660d37a" />
### Was this patch authored or co-authored using generative AI tooling?
No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-53173][SQL][TESTS] Improve the regex pattern in the replaceNotIncludedMsg method [spark]
Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on code in PR #51901:
URL: https://github.com/apache/spark/pull/51901#discussion_r2260499722
##########
sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestHelper.scala:
##########
@@ -57,7 +57,7 @@ trait SQLQueryTestHelper extends SQLConfHelper with Logging {
.replaceAll("Created By.*", s"Created By $notIncludedMsg")
.replaceAll("Created Time.*", s"Created Time $notIncludedMsg")
.replaceAll("Last Access.*", s"Last Access $notIncludedMsg")
- .replaceAll("Owner\t.*", s"Owner\t$notIncludedMsg")
+ .replaceAll("Owner.*", s"Owner $notIncludedMsg")
Review Comment:
Isn't it too general because `Owner` is too short?
BTW, some test cases seem to fail.
```
[info] - describe.sql *** FAILED *** (422 milliseconds)
[info] describe.sql
[info] Expected "...me test_schema
[info] Owner[ ][not included in com...", but got "...me test_schema
[info] Owner[ ][not included in com..." Result did not match for query #28
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-53173][SQL][TESTS] Improve `Owner` regex pattern in the replaceNotIncludedMsg method [spark]
Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on PR #51901:
URL: https://github.com/apache/spark/pull/51901#issuecomment-3182273069
+1, late LGTM. Thank you.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-53173][SQL][TESTS] Improve `Owner` regex pattern in the replaceNotIncludedMsg method [spark]
Posted by "wangyum (via GitHub)" <gi...@apache.org>.
wangyum commented on PR #51901:
URL: https://github.com/apache/spark/pull/51901#issuecomment-3182084100
Merged to master.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-53173][SQL][TESTS] Improve `Owner` regex pattern in the replaceNotIncludedMsg method [spark]
Posted by "wangyum (via GitHub)" <gi...@apache.org>.
wangyum closed pull request #51901: [SPARK-53173][SQL][TESTS] Improve `Owner` regex pattern in the replaceNotIncludedMsg method
URL: https://github.com/apache/spark/pull/51901
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-53173][SQL][TESTS] Improve `Owner` regex pattern in the replaceNotIncludedMsg method [spark]
Posted by "wangyum (via GitHub)" <gi...@apache.org>.
wangyum commented on code in PR #51901:
URL: https://github.com/apache/spark/pull/51901#discussion_r2261846316
##########
sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestHelper.scala:
##########
@@ -57,7 +57,7 @@ trait SQLQueryTestHelper extends SQLConfHelper with Logging {
.replaceAll("Created By.*", s"Created By $notIncludedMsg")
.replaceAll("Created Time.*", s"Created Time $notIncludedMsg")
.replaceAll("Last Access.*", s"Last Access $notIncludedMsg")
- .replaceAll("Owner\t.*", s"Owner\t$notIncludedMsg")
+ .replaceAll("Owner.*", s"Owner $notIncludedMsg")
Review Comment:
fixed it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org