This is an automated email from the ASF dual-hosted git repository. dongjoon 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 32e73dd55416 [MINOR][CORE] Replace `get+getOrElse` with `getOrElse` with default value in `StreamingQueryException` 32e73dd55416 is described below commit 32e73dd55416b3a0a81ea6b6635e6fedde378842 Author: yangjie01 <yangji...@baidu.com> AuthorDate: Thu Mar 28 07:37:01 2024 -0700 [MINOR][CORE] Replace `get+getOrElse` with `getOrElse` with default value in `StreamingQueryException` ### What changes were proposed in this pull request? This PR replaces `get + getOrElse` with `getOrElse` with a default value in `StreamingQueryException`. ### Why are the changes needed? Simplify code ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Pass GitHub Actions ### Was this patch authored or co-authored using generative AI tooling? No Closes #45753 from LuciferYang/minor-getOrElse. Authored-by: yangjie01 <yangji...@baidu.com> Signed-off-by: Dongjoon Hyun <dh...@apple.com> --- .../org/apache/spark/sql/streaming/StreamingQueryException.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/utils/src/main/scala/org/apache/spark/sql/streaming/StreamingQueryException.scala b/common/utils/src/main/scala/org/apache/spark/sql/streaming/StreamingQueryException.scala index 800a6dcfda8d..259f4330224c 100644 --- a/common/utils/src/main/scala/org/apache/spark/sql/streaming/StreamingQueryException.scala +++ b/common/utils/src/main/scala/org/apache/spark/sql/streaming/StreamingQueryException.scala @@ -48,11 +48,11 @@ class StreamingQueryException private[sql]( errorClass: String, messageParameters: Map[String, String]) = { this( - messageParameters.get("queryDebugString").getOrElse(""), + messageParameters.getOrElse("queryDebugString", ""), message, cause, - messageParameters.get("startOffset").getOrElse(""), - messageParameters.get("endOffset").getOrElse(""), + messageParameters.getOrElse("startOffset", ""), + messageParameters.getOrElse("endOffset", ""), errorClass, messageParameters) } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org