Skip to content

Commit 06bc085

Browse files
authored
Merge pull request #851 from Altinity/commit-missing-files
Commit missing changes
2 parents 1d52416 + c8ae912 commit 06bc085

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

pkg/eval/eval_query.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2440,5 +2440,6 @@ func NewEvalQuery(request interface{}, from, to time.Time) EvalQuery {
24402440
To: to,
24412441
FrontendDatasource: v.FieldByName("FrontendDatasource").Bool(),
24422442
UseWindowFuncForMacros: v.FieldByName("UseWindowFuncForMacros").Bool(),
2443+
MetadataUserLogin: v.FieldByName("MetadataUserLogin").String(),
24432444
}
24442445
}

pkg/resource_handlers.go

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,15 @@ import (
1717

1818
// Request/Response structures for resource handlers
1919

20-
2120
type Target struct {
2221
Database string `json:"database"`
2322
Table string `json:"table"`
2423
}
2524

2625
type ApplyAdhocFiltersRequest struct {
27-
Query string `json:"query"`
26+
Query string `json:"query"`
2827
AdhocFilters []adhoc.AdhocFilter `json:"adhocFilters"`
29-
Target Target `json:"target"`
28+
Target Target `json:"target"`
3029
}
3130

3231
type ApplyAdhocFiltersResponse struct {
@@ -54,6 +53,7 @@ type CreateQueryRequest struct {
5453
MaxDataPoints int64 `json:"maxDataPoints"`
5554
FrontendDatasource bool `json:"frontendDatasource"`
5655
UseWindowFuncForMacros bool `json:"useWindowFuncForMacros"`
56+
MetadataUserLogin string `json:"metadataUserLogin"`
5757
TimeRange struct {
5858
From string `json:"from"`
5959
To string `json:"to"`
@@ -112,14 +112,15 @@ type ProcessQueryBatchRequest struct {
112112
MaxDataPoints int64 `json:"maxDataPoints"`
113113
FrontendDatasource bool `json:"frontendDatasource"`
114114
UseWindowFuncForMacros bool `json:"useWindowFuncForMacros"`
115+
MetadataUserLogin string `json:"metadataUserLogin"`
115116
TimeRange struct {
116117
From string `json:"from"`
117118
To string `json:"to"`
118119
} `json:"timeRange"`
119120

120121
// Adhoc filter fields
121122
AdhocFilters []adhoc.AdhocFilter `json:"adhocFilters"`
122-
Target Target `json:"target"`
123+
Target Target `json:"target"`
123124

124125
// Properties to extract
125126
ExtractProperties []string `json:"extractProperties"`
@@ -164,14 +165,15 @@ type CreateQueryWithAdhocRequest struct {
164165
MaxDataPoints int64 `json:"maxDataPoints"`
165166
FrontendDatasource bool `json:"frontendDatasource"`
166167
UseWindowFuncForMacros bool `json:"useWindowFuncForMacros"`
168+
MetadataUserLogin string `json:"metadataUserLogin"`
167169
TimeRange struct {
168170
From string `json:"from"`
169171
To string `json:"to"`
170172
} `json:"timeRange"`
171173

172174
// Adhoc filter fields
173175
AdhocFilters []adhoc.AdhocFilter `json:"adhocFilters"`
174-
Target Target `json:"target"`
176+
Target Target `json:"target"`
175177
}
176178

177179
type CreateQueryWithAdhocResponse struct {
@@ -252,8 +254,6 @@ func findGroupByProperties(ast *eval.EvalAST) []interface{} {
252254
return []interface{}{}
253255
}
254256

255-
256-
257257
// handleCreateQuery processes query creation with macro expansion and time range handling
258258
func (ds *ClickHouseDatasource) handleCreateQuery(ctx context.Context, req *backend.CallResourceRequest, sender backend.CallResourceResponseSender) error {
259259
request, ok := requests.UnmarshalRequest[CreateQueryRequest](req, sender)
@@ -914,7 +914,6 @@ func sendUniversalErrorResponse(sender backend.CallResourceResponseSender, ctx E
914914
})
915915
}
916916

917-
918917
// handleCreateQueryWithAdhoc safely batches createQuery + applyAdhocFilters without property extraction
919918
func (ds *ClickHouseDatasource) handleCreateQueryWithAdhoc(ctx context.Context, req *backend.CallResourceRequest, sender backend.CallResourceResponseSender) error {
920919
var request CreateQueryWithAdhocRequest

0 commit comments

Comments
 (0)