mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-14 23:15:53 +08:00
fix: update how limit is added to table queries (#3207)
This commit is contained in:
parent
127ccdacb4
commit
7b85ece796
@ -442,7 +442,7 @@ func PrepareLogsQuery(start, end int64, queryType v3.QueryType, panelType v3.Pan
|
||||
query, err = reduceQuery(query, mq.ReduceTo, mq.AggregateOperator)
|
||||
}
|
||||
|
||||
if panelType == v3.PanelTypeList || panelType == v3.PanelTypeTable {
|
||||
if panelType == v3.PanelTypeList {
|
||||
if mq.PageSize > 0 {
|
||||
if mq.Limit > 0 && mq.Offset > mq.Limit {
|
||||
return "", fmt.Errorf("max limit exceeded")
|
||||
@ -452,8 +452,9 @@ func PrepareLogsQuery(start, end int64, queryType v3.QueryType, panelType v3.Pan
|
||||
} else {
|
||||
query = addLimitToQuery(query, mq.Limit)
|
||||
}
|
||||
} else if panelType == v3.PanelTypeTable {
|
||||
query = addLimitToQuery(query, mq.Limit)
|
||||
}
|
||||
|
||||
return query, err
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user