Repository navigation
Conversation
Re-analyzing the original AST resolved a `DataLakeCatalog` table again and repeated the REST catalog lookup. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep existing header analysis for all other clustered storage reads. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dbe0f46f39
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| sample_block = InterpreterSelectQueryAnalyzer::getSampleBlock(query_to_send, context, SelectQueryOptions(processed_stage)); | ||
| /// For an unchanged query, calculate the header from the resolved query tree. Re-analyzing | ||
| /// the original AST resolves DataLakeCatalog tables once more and repeats a remote catalog lookup. | ||
| if (canReuseResolvedQueryTreeForHeader() && query_to_send == query_info.query && query_info.query_tree) |
There was a problem hiding this comment.
Reuse the resolved tree after query rewrites
When a DataLakeCatalog query contains a JOIN or a table-referencing IN/WHERE that must remain on the initiator, updateQueryWithJoinToSendIfNeeded replaces query_to_send with a new AST. This condition then falls through to InterpreterSelectQueryAnalyzer::getSampleBlock, which resolves the catalog table again, so these supported cluster requests still perform duplicate catalog metadata reads despite the stated fix. Preserve the rewritten query tree for header calculation, or otherwise calculate the rewritten header without re-resolving the catalog; a focused test with a catalog table joined to a local Memory table would expose the duplicate lookup.
Useful? React with 👍 / 👎.
Re-analyzing the rewritten shard AST resolved the catalog table a second time. Co-authored-by: Cursor <cursoragent@cursor.com>
CI triage for f281aab (run 40862005818, still in progress)TL;DR: 6 red checks. 1 is caused by this PR (Swarms regression,
❌ Swarms regression (caused by this PR)The base-branch failures appear on #2730 and #2715 too: Nearly all the new failures have the same error: Counts: Root cause: this is the new branch at else if (canReuseResolvedQueryTreeForHeader() && query_to_send == query_info.query && query_info.query_tree)
sample_block = getHeaderForProcessingStage(column_names, storage_snapshot, query_info, context, processed_stage);When the join is not rewritten ( Suggested fix: use the shortcut only when it is safe, i.e. when this storage is the left/only table expression. For example: else if (canReuseResolvedQueryTreeForHeader() && query_to_send == query_info.query && query_info.query_tree
&& query_info.table_expression
&& extractLeftTableExpression(query_info.query_tree->as<QueryNode &>().getJoinTree()) == query_info.table_expression)The simpler option is to skip the shortcut whenever the query has a JOIN (
Report: swarms/report.html Pre-existing (not caused by this PR)The evidence is the same for all of these: the same test sets with the same counts fail on #2730 (fa0e5fe) and #2715 (afa617e), which don't touch this code.
PR's own tests ✅
Analysis is static, from the praktika/regression reports. A fix would be validated by the next CI run on this PR. |
The resolved tree kept the outer `__tableN` alias, so a non-leftmost catalog table did not match the shard block. Co-authored-by: Cursor <cursoragent@cursor.com>
CI triage for 6a9a4cbVerdict: 6 failing checks. 0 are clearly caused by this PR and 5 already fail on the base branch. One swarms scenario might be linked to this PR and needs a re-run to tell.
How I checked "pre-existing": I compared against praktika Integration tests: pre-existing, not this PRNone of these tests use
Regression oauth: pre-existingThe same 7 scenarios fail on #2735 and #2730, e.g. Regression swarms: mostly pre-existing, one scenario needs a lookThese 3 fail on every sibling PR (#2735, #2737, #2730, #2715):
What the test does (
This goes through exactly the branch the PR adds: a DataLakeCatalog table, analyzer on, The test is timing-sensitive by design: its own comments call stopping a node mid-query "inherently racy". So the likely explanation is that the shorter dispatch path changed the race, not that results are wrong. But this is one sample and I can't rule out a behaviour change from one run. Suggested next step:
Other notes
|
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Read Iceberg catalog once during cluster requests.
Documentation entry for user-facing changes
Solved #2721
CI/CD Options
Exclude tests:
Regression jobs to run: