Copilot commented on code in PR #3442:
URL: https://github.com/apache/fluss/pull/3442#discussion_r3445401225
##########
fluss-lake/fluss-lake-paimon/src/test/java/org/apache/fluss/lake/paimon/flink/FlinkUnionReadPrimaryKeyTableITCase.java:
##########
@@ -1119,6 +1119,69 @@ void
testUnionReadPartitionsExistInPaimonButExpiredInFluss() throws Exception {
jobClient.cancel().get();
}
+ @Test
+ void testPointLookupOnExpiredPartitionReadsFromLake() throws Exception {
+ JobClient jobClient = buildTieringJob(execEnv);
+
+ String tableName = "point_lookup_expired_partition_pk_table";
+ TablePath tablePath = TablePath.of(DEFAULT_DB, tableName);
Review Comment:
The tiering job is cancelled mid-test, but the test method doesn't ensure
cancellation if a failure happens before the explicit cancel (e.g., during
table/partition setup). This can leak a running job and make subsequent IT
cases flaky. Wrap the test body in a try/finally that cancels the JobClient,
and keep the early cancel for the intended semantics.
##########
fluss-flink/fluss-flink-common/src/main/java/org/apache/fluss/flink/source/FlinkTableSource.java:
##########
@@ -889,6 +894,36 @@ private int[] getKeyRowProjection() {
return projection;
}
+ private boolean lookupCoversAllData(
+ List<ResolvedExpression> filters, Map<Integer, LogicalType>
primaryKeyTypes) {
+ if (!isDataLakeEnabled || !isPartitioned()) {
+ return true;
+ }
+ return PushdownUtils.partitionExists(
+ tablePath, flussConfig, resolveLookupPartition(filters,
primaryKeyTypes));
+ }
Review Comment:
lookupCoversAllData() currently throws if the partition liveness check fails
(e.g., transient metadata/connection issue). Since this check is only to decide
whether to enable the single-row lookup optimization, failures should
conservatively fall back to the scan path instead of failing planning/execution.
--
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]