kumarpritam863 opened a new pull request, #18859: URL: https://github.com/apache/iceberg/pull/18859
Adds an opt-in conversion of the Avro logical types `time-millis` and `time-micros` to Iceberg `int` and `long` instead of `time`. In core, `AvroSchemaUtil.convert(Schema, boolean)` and `toIceberg(Schema, boolean)` take a `timeAsNumber` flag, also applied inside lists, maps and optional fields; the existing methods keep converting to `time`. In Flink 2.3, the dynamic sink option `dynamic-sink.avro-time-as-number` (default `false`) makes `VariantAvroDynamicTableRecordGenerator` derive its table schema with the flag. A Flink `time` holds milliseconds in an int, so the microseconds of a `time-micros` are lost on the way to the table; as a `long` they are kept. This covers core and Flink 2.3 only; backports follow. Test plan: `TestSchemaConversions` covers the default, the flag on required, optional, list and map fields, other logical types and a bare primitive. `TestVariantAvroDynamicTableRecordGenerator` covers the table schema by default, with the write option and with the Flink configuration. Both pass, as do the Avro tests in core and `revapi`. --- **AI Disclosure** - Model: Claude Sonnet 5.5 - Platform/Tool: Claude Code -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
