Skip to content

fix: zero-pad years below 1000 in date/datetime formatting - #278

Merged
Danish-sarwar1 merged 1 commit into
feat/upgrade-sarama-ibmfrom
fix/zero-pad-temporal-years
Jul 29, 2026
Merged

fix: zero-pad years below 1000 in date/datetime formatting#278
Danish-sarwar1 merged 1 commit into
feat/upgrade-sarama-ibmfrom
fix/zero-pad-temporal-years

Conversation

@Danish-sarwar1

Copy link
Copy Markdown
Contributor

convertDebeziumDate, convertDebeziumMilliseconds and convertDebeziumMicroseconds printed the year with %d, so a MySQL value like 0202-04-17 was serialized to S3 as "202-04-17" (9 chars). Redshift COPY (json 'auto') rejects such values with err 1205 "Invalid Date Format - length must be 10 or more" and the loader retries the same batch forever, stalling the sink and burning cluster cycles.

Pad the year with %04d so years below 1000 serialize as valid YYYY-MM-DD and load faithfully. Years 1000-9999 are unaffected.

convertDebeziumDate, convertDebeziumMilliseconds and
convertDebeziumMicroseconds printed the year with %d, so a MySQL value
like 0202-04-17 was serialized to S3 as "202-04-17" (9 chars).
Redshift COPY (json 'auto') rejects such values with err 1205 "Invalid
Date Format - length must be 10 or more" and the loader retries the
same batch forever, stalling the sink and burning cluster cycles.

Pad the year with %04d so years below 1000 serialize as valid
YYYY-MM-DD and load faithfully. Years 1000-9999 are unaffected.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d00dd54e-75fe-4d7e-b690-593bb3314fe2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Danish-sarwar1
Danish-sarwar1 merged commit 077c244 into feat/upgrade-sarama-ibm Jul 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant