Support Spanner's UNION syntax, which needs to be UNION DISTINCT or UNION ALL. (#101768)

* Support Spanner's UNION syntax, which needs to be UNION DISTINCT or UNION ALL.
This commit is contained in:
Peter Štibraný
2025-03-10 12:33:52 +01:00
committed by GitHub
parent 607d39b573
commit fd6a4908f1
13 changed files with 46 additions and 23 deletions
@@ -6,9 +6,10 @@ import (
"strconv"
"strings"
"go.opentelemetry.io/otel"
"github.com/grafana/grafana/pkg/infra/db"
"github.com/grafana/grafana/pkg/services/accesscontrol"
"go.opentelemetry.io/otel"
)
var tracer = otel.Tracer("github.com/grafana/grafana/pkg/services/accesscontrol/database")
@@ -58,7 +59,7 @@ func (s *AccessControlStore) GetUserPermissions(ctx context.Context, query acces
return nil
}
filter, params := accesscontrol.UserRolesFilter(query.OrgID, query.UserID, query.TeamIDs, query.Roles)
filter, params := accesscontrol.UserRolesFilter(query.OrgID, query.UserID, query.TeamIDs, query.Roles, s.sql.GetDialect())
q := `
SELECT