{"record":{"id":"876ee1d3232d525f","repo":"apache/seatunnel","slug":"will-probably-cause-value-overflow-876ee1","errorCode":null,"errorMessage":"{} will probably cause value overflow.","messagePattern":"(.+?) will probably cause value overflow\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-maxcompute/src/main/java/org/apache/seatunnel/connectors/seatunnel/maxcompute/datatype/MaxComputeTypeConverter.java","lineNumber":234,"sourceCode":"            valueDefine.setNativeType(((MapTypeInfo) nativeType).getValueTypeInfo());\n            Column valueColumn = convert(valueDefine);\n            MapType mapType = new MapType(keyColumn.getDataType(), valueColumn.getDataType());\n            return new PhysicalColumn(\n                    typeDefine.getName(),\n                    mapType,\n                    typeDefine.getLength(),\n                    typeDefine.getScale(),\n                    typeDefine.isNullable(),\n                    typeDefine.getDefaultValue(),\n                    typeDefine.getComment(),\n                    typeDefine.getNativeType().getTypeName(),\n                    new HashMap<>());\n        }\n\n        if (typeDefine.getNativeType() instanceof DecimalTypeInfo) {\n            DecimalType decimalType;\n            if (((DecimalTypeInfo) typeDefine.getNativeType()).getPrecision() > DEFAULT_PRECISION) {\n                log.warn(\"{} will probably cause value overflow.\", DECIMAL);\n                decimalType = new DecimalType(DEFAULT_PRECISION, DEFAULT_SCALE);\n            } else {\n                decimalType =\n                        new DecimalType(\n                                ((DecimalTypeInfo) typeDefine.getNativeType()).getPrecision(),\n                                ((DecimalTypeInfo) typeDefine.getNativeType()).getScale());\n            }\n            builder.dataType(decimalType);\n            builder.columnLength((long) decimalType.getPrecision());\n            builder.scale(decimalType.getScale());\n        } else if (typeDefine.getNativeType() instanceof AbstractCharTypeInfo) {\n            // CHAR(n) or VARCHAR(n)\n            builder.columnLength(\n                    TypeDefineUtils.charTo4ByteLength(\n                            (long)\n                                    ((AbstractCharTypeInfo) typeDefine.getNativeType())\n                                            .getLength()));\n            builder.dataType(BasicType.STRING_TYPE);","sourceCodeStart":216,"sourceCodeEnd":252,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-maxcompute/src/main/java/org/apache/seatunnel/connectors/seatunnel/maxcompute/datatype/MaxComputeTypeConverter.java#L216-L252","documentation":"MaxComputeTypeConverter.convert maps a MaxCompute DECIMAL column to a SeaTunnel DecimalType. When the source decimal's precision exceeds DEFAULT_PRECISION (the converter's max supported precision), it logs this warning and downgrades the type to decimal(DEFAULT_PRECISION, DEFAULT_SCALE), which can silently truncate/overflow values.","triggerScenarios":"Converting a table schema containing a DECIMAL(p,s) column where p > DEFAULT_PRECISION during convert (invoked directly, or from arrayColumn/keyColumn/valueColumn for nested columns).","commonSituations":"MaxCompute tables using large decimals (e.g. decimal(38,x)) where the connector default is lower; users unaware the connector caps decimal precision; data loss discovered only when reading values back.","solutions":["Check the source table's decimal precision and compare against the converter's DEFAULT_PRECISION","Reduce the source column precision to fit within the supported maximum, or cast in SQL before the connector reads it","Upgrade/patch MaxComputeTypeConverter to raise DEFAULT_PRECISION if the backend supports it","Use a STRING column type in the source if exact large-decimal values must be preserved"],"exampleFix":"// before\nDECIMAL(40, 5) col // exceeds DEFAULT_PRECISION, downgraded with warning\n// after\nCAST(col AS DECIMAL(38, 5)) AS col -- within supported precision","handlingStrategy":"validation","validationCode":"// before reading, check source decimal precision\nif (((DecimalTypeInfo) typeInfo).getPrecision() > 38) {\n    throw new IllegalArgumentException(\"Decimal precision exceeds supported max; cast source column\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Audit MaxCompute table DDLs for DECIMAL(p,s) with p > supported max","Cast oversized decimals in source SQL before the connector reads them","Document the connector's decimal precision cap for pipeline authors"],"tags":["maxcompute","decimal","type-conversion","precision"],"backgroundTag":"value-out-of-range","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}