github-actions[bot] commented on code in PR #70884:
URL: https://github.com/apache/doris/pull/70884#discussion_r4664975518
##########
fe/fe-connector/fe-connector-paimon/src/main/java/org/apache/doris/connector/paimon/PaimonScanParams.java:
##########
@@ -563,6 +563,55 @@ public static boolean preservesBoundSchema(Map<String,
String> options) {
return options != null &&
Boolean.parseBoolean(options.get(PRESERVE_BOUND_SCHEMA));
}
+ static java.util.OptionalLong boundSchemaId(Map<String, String> options) {
+ if (options == null) {
+ return java.util.OptionalLong.empty();
+ }
+ String schemaId = options.get(BOUND_SCHEMA_ID);
+ return schemaId == null
+ ? java.util.OptionalLong.empty()
+ : java.util.OptionalLong.of(Long.parseLong(schemaId));
+ }
+
+ static boolean hasPinnedVersion(Map<String, String> options) {
+ if (options == null || options.isEmpty()
+ || options.containsKey(CoreOptions.INCREMENTAL_BETWEEN.key())
+ ||
options.containsKey(CoreOptions.INCREMENTAL_BETWEEN_TIMESTAMP.key())) {
+ return false;
+ }
+ return options.containsKey(CoreOptions.SCAN_SNAPSHOT_ID.key())
+ || options.containsKey(CoreOptions.SCAN_TAG_NAME.key())
+ || isPinnedEmptyScan(options);
+ }
+
+ static boolean supportsPartitionViewVersion(Map<String, String> options) {
+ if (!hasPinnedVersion(options) ||
options.containsKey(PINNED_FILE_CREATION_TIME)) {
+ return false;
+ }
+ if (!isOptionsPin(options)) {
+ return true;
Review Comment:
[P2] Build the partition view at the pinned tag
A direct tag pin carries only `scan.tag-name` (the TAG time-travel path
intentionally preserves the tag so it still works after the snapshot file
expires). This new predicate treats that map as versioned, but
`collectPartitionsAuthenticated` only applies a historical copy for
`isOptionsPin` or when `scan.snapshot-id` is present; a direct tag therefore
lists the latest table's partitions while the scan reads the tag. If a tag
retains a partition later dropped from latest, the deferred/eager partition
view, counts, and partition-aware rules are wrong. Either apply the tag option
when collecting partitions or return no partition-view version for this
direct-tag shape until the collector is tag-aware.
--
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]