This is an automated email from the ASF dual-hosted git repository.

beto pushed a commit to branch default-db-schema-dropdown
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 89c5c55dcb16295e3b271465092e3957dbfeaf97
Author: Beto Dealmeida <[email protected]>
AuthorDate: Thu Dec 18 18:59:18 2025 -0500

    Small fix
---
 .../AceEditorWrapper/useKeywords.test.ts           | 26 +++++++++++++---------
 .../components/AceEditorWrapper/useKeywords.ts     |  3 ++-
 2 files changed, 18 insertions(+), 11 deletions(-)

diff --git 
a/superset-frontend/src/SqlLab/components/AceEditorWrapper/useKeywords.test.ts 
b/superset-frontend/src/SqlLab/components/AceEditorWrapper/useKeywords.test.ts
index e0f49b70e3..71ac29cac2 100644
--- 
a/superset-frontend/src/SqlLab/components/AceEditorWrapper/useKeywords.test.ts
+++ 
b/superset-frontend/src/SqlLab/components/AceEditorWrapper/useKeywords.test.ts
@@ -73,11 +73,14 @@ beforeEach(() => {
           dbId: expectDbId,
           forceRefresh: false,
         },
-        fakeSchemaApiResult.map(value => ({
-          value,
-          label: value,
-          title: value,
-        })),
+        {
+          schemas: fakeSchemaApiResult.map(value => ({
+            value,
+            label: value,
+            title: value,
+          })),
+          defaultSchema: null,
+        },
       ),
     );
     store.dispatch(
@@ -307,11 +310,14 @@ test('returns long keywords with docText', async () => {
           dbId: expectLongKeywordDbId,
           forceRefresh: false,
         },
-        ['short', longKeyword].map(value => ({
-          value,
-          label: value,
-          title: value,
-        })),
+        {
+          schemas: ['short', longKeyword].map(value => ({
+            value,
+            label: value,
+            title: value,
+          })),
+          defaultSchema: null,
+        },
       ),
     );
   });
diff --git 
a/superset-frontend/src/SqlLab/components/AceEditorWrapper/useKeywords.ts 
b/superset-frontend/src/SqlLab/components/AceEditorWrapper/useKeywords.ts
index 1a8eb7b368..b65eb41769 100644
--- a/superset-frontend/src/SqlLab/components/AceEditorWrapper/useKeywords.ts
+++ b/superset-frontend/src/SqlLab/components/AceEditorWrapper/useKeywords.ts
@@ -78,7 +78,7 @@ export function useKeywords(
   // skipFetch is used to prevent re-evaluating memoized keywords
   // due to updated api results by skip flag
   const skipFetch = hasFetchedKeywords && skip;
-  const { currentData: schemaOptions } = useSchemasQueryState(
+  const { currentData: schemaData } = useSchemasQueryState(
     {
       dbId,
       catalog: catalog || undefined,
@@ -86,6 +86,7 @@ export function useKeywords(
     },
     { skip: skipFetch || !dbId },
   );
+  const schemaOptions = schemaData?.schemas;
   const { currentData: tableData } = useTablesQueryState(
     {
       dbId,

Reply via email to