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

yangjie01 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 218051a566c7 [MINOR][SQL][TESTS] Use `formatString.format(value)` 
instead of `value.formatted(formatString)`
218051a566c7 is described below

commit 218051a566c78244573077a53d4be43ccc01311d
Author: panbingkun <[email protected]>
AuthorDate: Thu Sep 26 22:30:33 2024 +0800

    [MINOR][SQL][TESTS] Use `formatString.format(value)` instead of 
`value.formatted(formatString)`
    
    ### What changes were proposed in this pull request?
    The pr aims to use `formatString.format(value)` instead of 
`value.formatted(formatString)` for eliminating Warning.
    
    ### Why are the changes needed?
    <img width="876" alt="image" 
src="https://github.com/user-attachments/assets/0e5798f4-ec53-41f7-aba9-8f8e51347f59";>
    
    ### Does this PR introduce _any_ user-facing change?
    No.
    
    ### How was this patch tested?
    Pass GA.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    No.
    
    Closes #48262 from panbingkun/minor_formatted.
    
    Authored-by: panbingkun <[email protected]>
    Signed-off-by: yangjie01 <[email protected]>
---
 .../sql/execution/columnar/compression/CompressionSchemeBenchmark.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/sql/core/src/test/scala/org/apache/spark/sql/execution/columnar/compression/CompressionSchemeBenchmark.scala
 
b/sql/core/src/test/scala/org/apache/spark/sql/execution/columnar/compression/CompressionSchemeBenchmark.scala
index 05ae57530529..290cfd56b8bc 100644
--- 
a/sql/core/src/test/scala/org/apache/spark/sql/execution/columnar/compression/CompressionSchemeBenchmark.scala
+++ 
b/sql/core/src/test/scala/org/apache/spark/sql/execution/columnar/compression/CompressionSchemeBenchmark.scala
@@ -91,7 +91,7 @@ object CompressionSchemeBenchmark extends BenchmarkBase with 
AllCompressionSchem
 
     schemes.filter(_.supports(tpe)).foreach { scheme =>
       val (compressFunc, compressionRatio, buf) = prepareEncodeInternal(count, 
tpe, scheme, input)
-      val label = 
s"${getFormattedClassName(scheme)}(${compressionRatio.formatted("%.3f")})"
+      val label = 
s"${getFormattedClassName(scheme)}(${"%.3f".format(compressionRatio)})"
 
       benchmark.addCase(label)({ i: Int =>
         for (n <- 0L until iters) {


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

Reply via email to