github-actions[bot] commented on code in PR #69163:
URL: https://github.com/apache/doris/pull/69163#discussion_r4311742717
##########
be/src/format_v2/orc/orc_reader.cpp:
##########
@@ -1399,20 +1535,32 @@ Status
OrcReader::open(std::shared_ptr<format::FileScanRequest> request) {
_apply_split_range();
RETURN_IF_ERROR(_select_stripe_ranges_by_statistics());
- if (_state->stripe_pruning_applied &&
_state->selected_stripe_ranges.empty()) {
+ RETURN_IF_ERROR(_prepare_timestamp_stripe_ranges());
Review Comment:
[P1] Guard historical plain timestamps from SARG pruning
The new writer-zone decode also changes projected plain TIMESTAMP values
when an unread NANOS sibling exists, but `_select_stripe_ranges_by_statistics`
and the SDK row-index SARG still use the old statistics domain. For a one-row
stripe from the pinned C++ writer in `America/New_York`, carrier seconds
`-5364644638` and nanos `123456789` decode here as `1800-01-01
00:00:00.123457`, while the [SDK
writer](https://github.com/apache/doris-thirdparty/blob/be0f1b73a7aeb78824a03e0dcb692c50a176d513/c%2B%2B/src/ColumnWriter.cc#L1713-L1724)
records bounds at `1799-12-31 23:56:02.123456789` using its ancient standard
offset. `WHERE plain >= '1800-01-01 00:00:00'` therefore drops a matching row.
The new MIN/MAX fallback already acknowledges this discrepancy. Apply that
safeguard to both stripe and row-index predicate pruning, and cover the
historical fixture with pruning enabled/disabled and the NANOS sibling
unprojected.
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergUtils.java:
##########
@@ -1735,19 +1790,11 @@ public static Set<Integer>
getRequiredFieldIds(Iterable<Types.NestedField> field
}
public static boolean isBinaryLike(org.apache.iceberg.types.Type type) {
- return type.typeId() == TypeID.UUID || type.typeId() == TypeID.BINARY
- || type.typeId() == TypeID.FIXED;
+ return type.typeId() == TypeID.BINARY || type.typeId() == TypeID.FIXED;
Review Comment:
[P2] Retain UUID in the ORC backend compatibility guard
`isBinaryLike` also drives `validateWriteSchema(Table, ...)` and
`validateOrcBinaryWriteBackendCompatibility`. For an ORC table containing UUID
and ordinary columns only, removing UUID makes both checks return before
inspecting available smooth-upgrade source backends. Those backends remain
schedulable through `SimpleScheduler.isAvailable`, but the pre-change
`VOrcTransformer::_build_orc_type` requires a STRING/VARBINARY/BINARY carrier
for Iceberg UUID and fails its `DORIS_CHECK` on the new native UUID input.
Previously guarded INSERTs can now reach an incompatible old BE and fail. Keep
the ORC writer compatibility predicate separate from binary-default transport
classification, and add scalar/nested UUID-only coverage; the existing
mixed-schema test masks this because FIXED/BINARY still trigger the guard.
--
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]