fix(editor): bound analysis for large source documents

Closes #9208
This commit is contained in:
t8y2 committed 2026-09-26 14:27:19 +00:00
1 parent 94b5856e8d
commit b4f503e1f1
7 files changed
+386 -171

No files matched your search

@@ -69,6 +69,7 @@ interface QueryEditorDiagnosticsOptions {
semanticCompletionEnabled: boolean;
maxCompletionTables: number;
unknownObjectHighlightEnabled: boolean;
fullFeaturesEnabled?: () => boolean;
runtime: QueryEditorDiagnosticsRuntime;
metadata: QueryEditorDiagnosticMetadata;
}
@@ -200,7 +201,7 @@ export function useQueryEditorDiagnostics(options: QueryEditorDiagnosticsOptions
}
function shouldSkipSqlSemanticDiagnostics() {
return props.databaseType === "victoriametrics" || props.databaseType === "salesforce" || (props.databaseType !== "redis" && props.databaseType !== "mongodb" && !settingsStore.editorSettings.sqlSemanticDiagnosticsEnabled);
return options.fullFeaturesEnabled?.() === false || props.databaseType === "victoriametrics" || props.databaseType === "salesforce" || (props.databaseType !== "redis" && props.databaseType !== "mongodb" && !settingsStore.editorSettings.sqlSemanticDiagnosticsEnabled);
}
function rangesOverlap(left: { from: number; to: number }, right: { from: number; to: number }): boolean {