This is an automated email from the ASF dual-hosted git repository.

renqs pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink-cdc.git


The following commit(s) were added to refs/heads/master by this push:
     new 025653d77 [hotfix] run mvn spotless to fix code style violations. 
(#3219)
025653d77 is described below

commit 025653d77276856222aae0e90f3e0234d6106d90
Author: Hongshun Wang <[email protected]>
AuthorDate: Thu Apr 11 17:15:42 2024 +0800

    [hotfix] run mvn spotless to fix code style violations. (#3219)
---
 .../flink/cdc/connectors/starrocks/sink/StarRocksUtils.java   | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git 
a/flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-starrocks/src/main/java/org/apache/flink/cdc/connectors/starrocks/sink/StarRocksUtils.java
 
b/flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-starrocks/src/main/java/org/apache/flink/cdc/connectors/starrocks/sink/StarRocksUtils.java
index 642a9dd3d..ccab99c7a 100644
--- 
a/flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-starrocks/src/main/java/org/apache/flink/cdc/connectors/starrocks/sink/StarRocksUtils.java
+++ 
b/flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-starrocks/src/main/java/org/apache/flink/cdc/connectors/starrocks/sink/StarRocksUtils.java
@@ -305,10 +305,15 @@ public class StarRocksUtils {
                 builder.setDecimalDigits(decimalType.getScale());
             } else {
                 builder.setDataType(VARCHAR);
-                // For a DecimalType with precision N, we may need N + 1 or N 
+ 2 characters to store it as a
+                // For a DecimalType with precision N, we may need N + 1 or N 
+ 2 characters to
+                // store it as a
                 // string (one for negative sign, and one for decimal point)
-                builder.setColumnSize(Math.min(
-                        decimalType.getScale() != 0? 
decimalType.getPrecision() + 2:decimalType.getPrecision() + 1, 
MAX_VARCHAR_SIZE));
+                builder.setColumnSize(
+                        Math.min(
+                                decimalType.getScale() != 0
+                                        ? decimalType.getPrecision() + 2
+                                        : decimalType.getPrecision() + 1,
+                                MAX_VARCHAR_SIZE));
             }
             builder.setNullable(decimalType.isNullable());
             return builder;

Reply via email to