8343946: JFR: Wildcard should only work with COUNT for 'jfr view'
Reviewed-by: mgronlun
This commit is contained in:
parent
2989d8734c
commit
e5eaa7f1eb
@ -144,7 +144,7 @@ final class QueryResolver {
|
||||
field.aggregator = expression.aggregator();
|
||||
FieldBuilder.configureAggregator(field);
|
||||
expression.alias().ifPresent(alias -> fieldAliases.put(alias, field));
|
||||
if (field.name.equals("*") && field.aggregator != Aggregator.COUNT) {
|
||||
if (expression.name().equals("*") && field.aggregator != Aggregator.COUNT) {
|
||||
throw new QuerySyntaxException("Wildcard ('*') can only be used with aggregator function COUNT");
|
||||
}
|
||||
}
|
||||
@ -259,7 +259,7 @@ final class QueryResolver {
|
||||
List<Field> fields = new ArrayList<>();
|
||||
|
||||
if (name.equals("*")) {
|
||||
// Used with COUNT(*) and UNIQUE(*)
|
||||
// Used with COUNT(*)
|
||||
// All events should have a start time
|
||||
name = "startTime";
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ table = "COLUMN 'StackTrace', 'Count', 'Avg.', 'Max.'
|
||||
[application.contention-by-address]
|
||||
label = "Contention by Monitor Address"
|
||||
table = "COLUMN 'Monitor Address', 'Class', 'Threads', 'Max Duration'
|
||||
SELECT address, FIRST(monitorClass), UNIQUE(*), MAX(duration) AS M
|
||||
SELECT address, FIRST(monitorClass), UNIQUE(eventThread), MAX(duration) AS M
|
||||
FROM JavaMonitorEnter
|
||||
GROUP BY monitorClass ORDER BY M"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user