Skip to content

[SPARK-56243][SS] Throw detailed error on malformed Kafka record timestamps#55038

Closed
kavpreetgrewal wants to merge 2 commits intoapache:masterfrom
kavpreetgrewal:SPARK-56243-timestamp-parsing
Closed

[SPARK-56243][SS] Throw detailed error on malformed Kafka record timestamps#55038
kavpreetgrewal wants to merge 2 commits intoapache:masterfrom
kavpreetgrewal:SPARK-56243-timestamp-parsing

Conversation

@kavpreetgrewal
Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Throw a detailed KAFKA_MALFORMED_RECORD_TIMESTAMP message when a record has a malformed or incorrect precision timestamp.

Why are the changes needed?

Some users may use custom producers which set the timestamp to an incorrect precision level than what is expected by Kafka. Upon hitting this issue, they would get a generic arithmetic overflow error.

Does this PR introduce any user-facing change?

Yes, it introduces a new error message, however there is no other behavioral change.

How was this patch tested?

N/A

Was this patch authored or co-authored using generative AI tooling?

No.

Copy link
Copy Markdown

@mikelin1998 mikelin1998 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@HeartSaVioR
Copy link
Copy Markdown
Contributor

Looks OK to me. Would it be able to come up with test? I guess this should be very easy to reproduce from the description?

Copy link
Copy Markdown
Contributor

@HeartSaVioR HeartSaVioR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@HeartSaVioR
Copy link
Copy Markdown
Contributor

https://github.com/kavpreetgrewal/spark/actions/runs/23923726141/job/69775901628

I've confirmed the CI failure is not relevant.

@HeartSaVioR
Copy link
Copy Markdown
Contributor

Thanks! Merging to master.

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.

3 participants