Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,6 @@ public class DistributeHintTest extends TPCHTestBase {

private List<String> failCases = new ArrayList<>();

@Test
public void testLeading() {
for (int t = 3; t < 10; t++) {
for (int e = t - 1; e <= (t * (t - 1)) / 2; e++) {
for (int i = 0; i < 10; i++) {
System.out.println("TableNumber: " + String.valueOf(t) + " EdgeNumber: " + e + " Iteration: " + i);
randomTest(t, e, false, true);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Preserve a deterministic guard for the known semi-join failure

Please replace this randomized entry with a small deterministic guard before deleting it. The reported missing map entry is a concrete production-invalid rewrite, not only evaluator noise. For an original A LEFT SEMI JOIN B ON A.k = B.k, an extra C, and leading(B C A), current LeadingHint.getJoinConstraint can produce:

Join(A.k = B.k)       // B.k is absent from both children
  RightSemiJoin
    Scan(B)
    Scan(C)           // right-semi output is C only
  Scan(A)

The guard at LeadingHint.java:420-422 tests isSubset(...) && !isSubset(...) on the same arguments, so it never rejects getJoinConstraint(B|C, B, C); the child keeps bitmap B|C after dropping B, and the saved predicate is attached above it. #65205 added the exact withoutRetainedSide assertion after this muted test exposed the issue, and #65546 reverted that fix plus its focused tests while a correct fix remained outstanding. The cited FE-UT validation now only runs withLeading=false, while the broad result suites do not directly assert this constraint rejection. A tiny direct LeadingHintTest covering early left/right semi/anti matches would preserve the important signal without the ~51,000 unseeded attempts.

}
}
}
int totalCases = successCases + unsuccessCases;
System.out.println("TotalCases: " + totalCases + "\tSuccessCases: " + successCases + unsuccessCases + "\tUnSuccessCases: " + 0);
for (String treePlan : failCases) {
System.out.println(treePlan);
}
}

@Test
public void testHintJoin() {
for (int t = 3; t < 10; t++) {
Expand Down
Loading