sdk2 commented on code in PR #69404:
URL: https://github.com/apache/doris/pull/69404#discussion_r4799760581
##########
fe/fe-connector/fe-connector-hive/src/main/java/org/apache/doris/connector/hive/HiveWritePlanProvider.java:
##########
@@ -322,16 +324,16 @@ private static List<THiveColumn>
buildColumns(HmsTableInfo table) {
return columns;
}
- // Port of legacy HiveTableSink.setPartitionValues: for a partitioned
table, list live partitions and
- // convert each to a THivePartition (values + per-partition file format +
in-place location). Live/uncached
- // (matches the scan path; registered deviation DV-INC4-livepart).
HmsClient calls self-authenticate.
- private List<THivePartition> buildExistingPartitions(HmsTableInfo table) {
+ // Load only the target of a fully static string-partition write. Other
writes retain the full listing.
+ // Missing partitions are omitted by getExistingPartitions and classified
as NEW by BE.
+ private List<THivePartition> buildExistingPartitions(HmsTableInfo table,
ConnectorWriteHandle handle) {
List<THivePartition> partitions = new ArrayList<>();
if (table.getPartitionKeys().isEmpty()) {
return partitions;
}
- List<String> partitionNames = hmsClient.listPartitionNames(
- table.getDbName(), table.getTableName(), -1);
+ Optional<String> staticPartitionName = fullyStaticPartitionName(table,
handle);
+ List<String> partitionNames =
staticPartitionName.map(Collections::singletonList)
Review Comment:
Done: the static target now reads through
`HmsClient.getExistingPartitionsFresh`, which bypasses the partition-object
cache; `CachingHmsClient` delegates it to the uncached client. Missing names
stay omission-tolerant, so a dropped target is classified NEW by BE. Added a
cache test and a provider test for the stale/dropped target.
--
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]