fix local name set definition to use struct

This commit is contained in:
elianddb
2026-01-07 12:14:56 -08:00
parent 809cd1ad69
commit b8f00a1430
+2 -2
View File
@@ -1690,7 +1690,7 @@ func (db Database) GetAllTableNames(ctx *sql.Context, showSystemTables bool) ([]
func (db Database) getAllTableNames(ctx *sql.Context, root doltdb.RootValue, includeGeneratedSystemTables bool, includeRootObjects bool, includeNonlocalTables readNonlocalTablesFlag) ([]string, error) {
var err error
var result []string
localNameSet := map[string]any{}
localNameSet := map[string]struct{}{}
// If we are in a schema-enabled session and the schema name is not set, we need to union all table names in all
// schemas in the search_path
if resolve.UseSearchPath && db.schemaName == "" {
@@ -1707,7 +1707,7 @@ func (db Database) getAllTableNames(ctx *sql.Context, root doltdb.RootValue, inc
return nil, err
}
for _, nameStr := range result {
localNameSet[nameStr] = nil
localNameSet[nameStr] = struct{}{}
}
}