GOODBOY008 commented on code in PR #3833:
URL: https://github.com/apache/flink-cdc/pull/3833#discussion_r1915881357
##########
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-debezium/src/main/java/org/apache/flink/cdc/debezium/event/DebeziumSchemaDataTypeInference.java:
##########
@@ -188,6 +188,10 @@ protected DataType inferBytes(Object value, Schema schema)
{
protected DataType inferStruct(Object value, Schema schema) {
Struct struct = (Struct) value;
if (VariableScaleDecimal.LOGICAL_NAME.equals(schema.name())) {
+ if (struct == null) {
+ // set the default value
+ return DataTypes.DECIMAL(10, 0);
Review Comment:
@linjianchang Can you add unit test for this scenario?
--
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]