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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to