[connectors] Improved tests for Avro connectors#6619
Conversation
Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
mythical-fred
left a comment
There was a problem hiding this comment.
LGTM. The timestamp_tz_format was silently defaulting to the string format, so TIMESTAMP WITH TIME ZONE columns produced invalid Avro against timestamp-{micros,millis} schemas — good catch. Round-trip via gen_raw_parser_test covers the encoder-side fix, and the wire-format test pins down the decode direction.
mythical-fred
left a comment
There was a problem hiding this comment.
Tightens Avro coverage for TIMESTAMP WITH TIME ZONE.
serializer.rs now sets with_timestamp_tz_format(MicrosSinceEpoch) — previously the timestamp-tz format was left at its default, which is a real gap on the output side that the new tests would have surfaced eventually. Worth noting this is a small behaviour fix, not just tests.
Coverage is solid:
- Round-trip tests for both
timestamp-microsandtimestamp-millisAvro logical types, with sub-millisecond values on the micros path so precision is actually exercised. test_timestamp_tz_wire_formatdecodes hand-builtValue::TimestampMillis/Value::TimestampMicrosrecords against hard-coded expectedTimestampTz— good sanity check that the decoder isn't losing units.- End-to-end kafka avro workload gains a
timestamp with time zonecolumn, withdecimaltightened todecimal(10, 2)for stable Avro representation.
Clean commit, signed-off, no AI trailer. LGTM.
|
@ryzhyk do we need these tests in addition to the ones you wrote? |
The tests include fixing a bug in the output Avro connector configuration.
The focus was on covering TIMESTAMP WITH TIME ZONE.