You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/02/02 08:17:36 UTC

[GitHub] Ngone51 opened a new pull request #23725: [SPARK-26814][SQL] Avoid unnecessary block concatenation while empty block exists

Ngone51 opened a new pull request #23725: [SPARK-26814][SQL] Avoid unnecessary block concatenation while empty block exists
URL: https://github.com/apache/spark/pull/23725
 
 
   ## What changes were proposed in this pull request?
   
   We should always avoid unnecessary block concatenation while empty block exists among the two Blocks, which avoid redundant code interpolation for blocks. 
   
   For example(see code snapshot below), when we do not need to register comment, method "+"  should return immediately instead of doing redundant code interpolation for `eval.code`.
   
   ``` 
   If (eval.code.toString.nonEmpty) {
     // Add `this` in the comment.
     eval.copy(code = ctx.registerComment(this.toString) + eval.code)
   } else {
     eval
   } 
   ```
   
   ## How was this patch tested?
   
   Exists.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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