You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/01/11 03:00:32 UTC

[GitHub] [incubator-seatunnel] TyrantLucifer opened a new pull request #1003: [Seatunnel #1001][spark-connector-clickhouse] Optimize the recursive performance

TyrantLucifer opened a new pull request #1003:
URL: https://github.com/apache/incubator-seatunnel/pull/1003


   
   <!--
   
   Thank you for contributing to SeaTunnel! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [GITHUB issue](https://github.com/apache/incubator-seatunnel/issues).
   
     - Name the pull request in the form "[SeaTunnel #XXXX] [component] Title of the pull request", where *SeaTunnel #XXXX* should be replaced by the actual issue number.
   
     - Minor fixes should be named following this pattern: `[hotfix] [docs] Fix typo in README.md doc`.
   
   -->
   
   ## Purpose of this pull request
   
   Optimize the recursive performance of  some functions in spark-connector-clickhouse
   
   
   <!-- Describe the purpose of this pull request. For example: This pull request adds checkstyle plugin.-->
   
   ## Check list
   
   * [ ] Code changed are covered with tests, or it does not need tests for reason:
   * [ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/incubator-seatunnel/tree/dev/docs
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-seatunnel] TyrantLucifer closed pull request #1003: [Seatunnel #1001][spark-connector-clickhouse] Optimize the recursive performance

Posted by GitBox <gi...@apache.org>.
TyrantLucifer closed pull request #1003:
URL: https://github.com/apache/incubator-seatunnel/pull/1003


   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-seatunnel] CalvinKirs commented on pull request #1003: [Seatunnel #1001][spark-connector-clickhouse] Optimize the recursive performance

Posted by GitBox <gi...@apache.org>.
CalvinKirs commented on pull request #1003:
URL: https://github.com/apache/incubator-seatunnel/pull/1003#issuecomment-1012784618


   @wuchunfu hi,PTAL,thx


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-seatunnel] TyrantLucifer commented on a change in pull request #1003: [Seatunnel #1001][spark-connector-clickhouse] Optimize the recursive performance

Posted by GitBox <gi...@apache.org>.
TyrantLucifer commented on a change in pull request #1003:
URL: https://github.com/apache/incubator-seatunnel/pull/1003#discussion_r784530222



##########
File path: seatunnel-connectors/seatunnel-connector-spark-clickhouse/src/main/scala/org/apache/seatunnel/spark/sink/Clickhouse.scala
##########
@@ -201,6 +202,7 @@ class Clickhouse extends SparkBatchSink {
     }
   }
 
+  @tailrec

Review comment:
       OK, thank you for your reply, I will try it at the code level.




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-seatunnel] wuchunfu commented on a change in pull request #1003: [Seatunnel #1001][spark-connector-clickhouse] Optimize the recursive performance

Posted by GitBox <gi...@apache.org>.
wuchunfu commented on a change in pull request #1003:
URL: https://github.com/apache/incubator-seatunnel/pull/1003#discussion_r784526415



##########
File path: seatunnel-connectors/seatunnel-connector-spark-clickhouse/src/main/scala/org/apache/seatunnel/spark/sink/Clickhouse.scala
##########
@@ -201,6 +202,7 @@ class Clickhouse extends SparkBatchSink {
     }
   }
 
+  @tailrec

Review comment:
       I think the `tailrec` annotation is only for debugging purposes, you can signal to the compiler and other developers that the method must be optimized. Can you optimize from the code level.
   
   See [scala.annotation.tailrec](https://www.scala-lang.org/api/current/scala/annotation/tailrec.html)
   
   > A method annotation which verifies that the method will be compiled with tail call optimization.
   > If it is present, the compiler will issue an error if the method cannot be optimized into a loop.
   




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org