github-actions[bot] commented on code in PR #68276:
URL: https://github.com/apache/doris/pull/68276#discussion_r4067926831
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergUtils.java:
##########
@@ -1132,7 +1132,8 @@ private static String
serializePartitionValue(org.apache.iceberg.types.Type type
long timestampMicros = (Long) value;
TimestampType timestampType = (TimestampType) type;
LocalDateTime timestamp = LocalDateTime.ofEpochSecond(
- timestampMicros / 1_000_000, (int) (timestampMicros %
1_000_000) * 1000,
+ Math.floorDiv(timestampMicros, 1_000_000L),
+ Math.toIntExact(Math.floorMod(timestampMicros,
1_000_000L) * 1_000L),
Review Comment:
[P2] Preserve mapped timestamptz partition values
With `enable.mapping.timestamp_tz=true`, this newly valid negative
fractional value can still be lost when reading `$position_deletes.partition`.
`serializePartitionValue` converts a with-zone instant to a session-local
`LocalDateTime` and emits it without an offset; both native position-delete
readers then parse the struct with default `FormatOptions` (no timezone). The
TIMESTAMPTZ parser rejects that offsetless child, and the nullable SerDe
silently inserts `NULL`. Thus `-1` microsecond changes from a planning error
before this hunk to an incorrect null after it. Please preserve an offset/UTC
instant in this transport (or otherwise provide unambiguous timezone context)
and cover the mapping-enabled negative with-zone case in both reader modes.
--
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]