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: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
