fix: Prevent various invalid DESCRIBE queries#2448
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: d7d4bf3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
🔵 Tier 2 — Low RiskSmall, isolated change with no API route or data model modifications. Why this tier:
Review process: AI review + quick human skim (target: 5–15 min). Reviewer validates AI assessment and checks for domain-specific concerns. Stats
|
Greptile SummaryThis PR adds two guards to prevent invalid
Confidence Score: 5/5Safe to merge — both fixes are defensive early-exit guards with no effect on code paths where the conditions are already satisfied. The changes are minimal, well-tested, and touch only the two call sites that were producing spurious DESCRIBE queries. The empty-where fallback feeds into existing isNonEmptyWhereExpr handling inside aggFnExpr, so behavior for non-empty conditions is unchanged. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[renderSelectList] --> B{isNonEmptyWhereExpr\naggCondition?}
B -- yes --> C[renderWhereExpression\nDESCRIBE query fires]
B -- no --> D[chSql empty\nno DESCRIBE]
C --> E[aggFnExpr\nwhere = whereClause.sql]
D --> E
F[genEnglishExplanation] --> G{parsedQ &&\ntableName &&\ndatabaseName &&\nconnectionId?}
G -- yes --> H[EnglishSerializer\nDESCRIBE query fires]
G -- no --> I[fallback:\nMessage containing query]
H --> J[return English text]
I --> J
Reviews (3): Last reviewed commit: "fix: Skip english lucene generation when..." | Re-trigger Greptile |
E2E Test Results✅ All tests passed • 202 passed • 3 skipped • 1307s
Tests ran across 4 shards in parallel. |
8e2b67e to
669f606
Compare
669f606 to
d7d4bf3
Compare
Summary
This PR adds some conditions that prevent a few invalid DESCRIBE queries, which resulted in console errors:
aggConditionon a select item. This fixes the invalid DESCRIBE queries mentioned in Grouped metric charts/alerts emit a failingDESCRIBE TABLE.Bucketed(UNKNOWN_TABLE) on every evaluation #2409Screenshots or video
Before - Invalid
DESCRIBE .BucketandDESCRIBE .queries being issued from renderWhereExpression and Lucene --> English translation:After - No such invalid queries:
How to test on Vercel preview
References
DESCRIBE TABLE.Bucketed(UNKNOWN_TABLE) on every evaluation #2409