kwonder0926 opened a new pull request, #596: URL: https://github.com/apache/doris-flink-connector/pull/596
# Proposed changes Previously, all numeric types were converted to Decimal to prevent precision loss when syncing mixed-type fields from MongoDB to Doris. This caused unnecessary precision degradation for single-type fields. For example, if the initial table has a small amount of data and an INT-type field with all values below 1000, after conversion to DECIMAL, the numeric precision will be limited to 3 digits. If the data evolves with business growth and the field value later exceeds 1000 (e.g., becomes a 4-digit number), it will lose precision due to the previously inferred limited length. ## Problem Summary: This commit improves the type inference logic: - Only convert to Decimal if multiple types are present in the sampled data; - Retain original types (e.g., INT, BIGINT) for fields with consistent data types; ## Checklist(Required) 1. Does it affect the original behavior: (No) 2. Has unit tests been added: (Yes) 3. Has document been added or modified: (No Need) 4. Does it need to update dependencies: (No) 5. Are there any changes that cannot be rolled back: (Yes) ## Further comments -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org