DanielLeens commented on issue #11632:
URL: https://github.com/apache/seatunnel/issues/11632#issuecomment-5173416317

   Thanks for the very complete report and for separating this from the earlier 
Debezium-specific default-value fix.
   
   I checked the JSON format path you described, and this does look like a real 
bug rather than a usage problem. The `defaultValue` is carried on the schema 
column metadata, but the current JSON deserialization path drops that metadata 
before `JsonToRowConverters` handles missing or explicit `null` fields, so 
configured defaults are never applied.
   
   Your proposed fix direction also looks reasonable and backward-compatible:
   
   1. pass column metadata into the JSON row converter;
   2. apply `defaultValue` when a field is missing or explicitly `null`;
   3. keep the current behavior unchanged when no default value is configured;
   4. cover both numeric and string defaults with focused regression tests.
   
   Since you marked that you are willing to submit a PR, I've assigned the 
issue to you. Please feel free to open the PR against `dev` and link it here. 
The most important acceptance checks are:
   
   - missing field -> configured default value;
   - explicit JSON `null` -> configured default value;
   - no configured default -> existing `null` behavior preserved;
   - no regression for `failOnMissingField` / parse-error handling.
   
   Thanks again for writing this up so concretely.


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