spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [spark] MaxGekk opened a new pull request #25782: [SPARK-29074][SQL] Optimize `date_format` for foldable `fmt`
Date Fri, 13 Sep 2019 09:48:04 GMT
MaxGekk opened a new pull request #25782: [SPARK-29074][SQL] Optimize `date_format` for foldable
`fmt`
URL: https://github.com/apache/spark/pull/25782
 
 
   ### What changes were proposed in this pull request?
   
   In the PR, I propose to create an instance of `TimestampFormatter` only once at the initialization,
and reuse it inside of `nullSafeEval()` and `doGenCode()` in the case when the `fmt` parameter
is foldable.
   
   ### Why are the changes needed?
   
   The changes improve performance of the `date_format()` function.
   
   Before:
   ```
   format date:                             Best/Avg Time(ms)    Rate(M/s)   Per Row(ns) 
 Relative
   ------------------------------------------------------------------------------------------------
   format date wholestage off                    7180 / 7181          1.4         718.0  
    1.0X
   format date wholestage on                     7051 / 7194          1.4         705.1  
    1.0X
   ```
   
   After:
   ```
   format date:                             Best/Avg Time(ms)    Rate(M/s)   Per Row(ns) 
 Relative
   ------------------------------------------------------------------------------------------------
   format date wholestage off                    6642 / 6666          1.4         664.2  
    1.0X
   format date wholestage on                     6556 / 6565          1.5         655.6  
    1.0X
   ```
   
   ### Does this PR introduce any user-facing change?
   No.
   
   ### How was this patch tested?
   
   By existing test suites `DateExpressionsSuite` and `DateFunctionsSuite`.
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message