loserwang1024 commented on code in PR #3150:
URL: https://github.com/apache/flink-cdc/pull/3150#discussion_r1526000193


##########
flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-starrocks/src/main/java/org/apache/flink/cdc/connectors/starrocks/sink/StarRocksUtils.java:
##########
@@ -297,10 +297,29 @@ public StarRocksColumn.Builder visit(DoubleType 
doubleType) {
 
         @Override
         public StarRocksColumn.Builder visit(DecimalType decimalType) {
-            builder.setDataType(DECIMAL);
+            // StarRocks is not support Decimal as primary key, so decimal 
should be cast to INT,
+            // BIGINT, LARGEINT or VARHCAR.
+            if (!isPrimaryKeys) {

Review Comment:
   Based on Flink Schema passed to sink, SEE 
org.apache.flink.cdc.connectors.starrocks.sink.StarRocksUtils#toStarRocksTable 
-> 
org.apache.flink.cdc.connectors.starrocks.sink.StarRocksUtils#toStarRocksDataType



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