Repository navigation
[CALCITE-7928] Cross join lateral query blows up in the new top-down decorrelator - #5408
xiedeyantu wants to merge 2 commits into
Conversation
|
@xiedeyantu what have you observed locally in terms of execution time of the problematic test before and after the patch? |
@rubenada I reran the problematic query locally with top-down decorrelation enabled (macOS ARM64, JDK 17.0.12, -Xmx1536m). In fresh JVMs, the first execution took about 29.9 s before the patch and 1.13 s after it. These timings include planning, execution, and fetching results, excluding JVM startup and connection setup. Both returned the expected two rows. I know this part of the code was written by @silundong , with @mihaibudiu as the reviewer. I’m not sure if they have the time to fix this bug or review this PR. |
Signed-off-by: xiedeyantu <czjourney@163.com>
|
Would be nice to understand how such a simple query can take such a long time. |
|
This PR does not address the fundamental problem; it makes the decorrelator hand off a smaller plan to the planner, but the problem is in the planner. |
|
Mihai has created a new PR. I agree with the issue he raised, so I am closing this PR. |
|
Thanks for your work here anyway @xiedeyantu. |
|
@rubenada Do you mean I should treat this as an optimization for the new top-down decorrelator, rather than as a fix for a CI issue? That might be a valid approach—should I submit a new JIRA ticket? However, as @mihaibudiu pointed out, this doesn't seem to address the root cause of the problem. |
|
@xiedeyantu correct, we could open a separate ticket for this top-down decorrelator optimization, unrelated to the CI issue. |
Jira Link
CALCITE-7928
Changes Proposed
To be honest, I’m not very familiar with this area; I only discovered it because it was causing a blockage in the CI pipeline. The code here was implemented entirely with the help of Codex—hopefully, it might serve as a source of inspiration for others.