Yes correct, Flink shouldn’t make any assumptions on what is inside the user function.
That is true, the exception may not be from a direct result of unexpected data, but the incoming data coupled by the state of the job is causing unexpected behaviour. From my perspective, I wouldn’t want to defensively code my function to the n-th degree, I would rather try to understand why my function was failing (either due to the message I’m processing at the time, along with the state of the function) and fix the issue that way. Then I’d defensively code the function as appropriate.
CHIEF TECHNOLOGY OFFICER
Support Line : +44(0) 2031 371 603
Mobile : +852 9611 3969
9/F, 33 Lockhart Road, Wan Chai, Hong Kong
This message, including any attachments, may include private, privileged and confidential information and is intended only for the personal and confidential use of the intended recipient(s). If the reader of this message is not an intended recipient, you are hereby notified that any review, use, dissemination, distribution, printing or copying of this message or its contents is strictly prohibited and may be unlawful. If you are not an intended recipient or have received this communication in error, please immediately notify the sender by telephone and/or a reply email and permanently delete the original message, including any attachments, without making a copy.