liferoad opened a new pull request, #37795:
URL: https://github.com/apache/beam/pull/37795
## What changed
- Updated `KafkaConnectUtils.debeziumRecordInstant(SourceRecord)` to avoid
dereferencing `valueSchema()` when it is null.
- Preserved existing `ts_ms` extraction path for normal struct-valued
Debezium records.
- Added fallback to `sourceOffset.ts_usec` (microseconds) for DELETE events
and converted to epoch millis.
- Added/updated unit tests in `KafkaConnectSchemaTest` for:
- null `valueSchema` + `ts_usec` fallback success
- missing timestamp sources throws `IllegalArgumentException`
## Why
Fixes a NullPointerException reported for Debezium DELETE operations where
`value` and `valueSchema` are null but timestamp exists in source offset
metadata.
Fixes #37738
## Testing
- Attempted: `./gradlew :sdks:java:io:debezium:test --tests
org.apache.beam.io.debezium.KafkaConnectSchemaTest --no-daemon`
- Result in this environment: cannot run due to missing local Java runtime
(`Unable to locate a Java Runtime`).
--
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]