Skip to content

Commit

Permalink
8346099: JFR: Query for 'jfr view' can't handle wildcard with multipl…
Browse files Browse the repository at this point in the history
…e event types

Reviewed-by: mgronlun
  • Loading branch information
egahlin committed Jan 8, 2025
1 parent 55bcf4c commit 3fe0818
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,6 @@ record WildcardElement(String name, String label, ValueDescriptor field) {
FieldBuilder fb = new FieldBuilder(eventTypes, type, we.name());
Field field = fb.build().getFirst();
field.label = we.label;
field.index = result.size();
field.visible = true;
field.sourceFields.add(field);
result.add(field);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,19 @@ public List<Field> resolve() throws QueryException {
resolveGroupBy();
resolveOrderBy();
resolveWhere();
applyIndex();
applyColumn();
applyFormat();
return resultFields;
}

private void applyIndex() {
int index = 0;
for (Field field : resultFields) {
field.index = index++;
}
}

private void resolveWhere() throws QuerySyntaxException {
for (Condition condition : where) {
List<Field> fields = new ArrayList<>();
Expand Down Expand Up @@ -238,7 +246,6 @@ private Field addField(String name, List<FilteredType> types) throws QueryExcept
}
}
for (Field field: fields) {
field.index = resultFields.size();
primary.sourceFields.add(field);
// Convert to String if field data types mismatch
if (mixedTypes) {
Expand Down

1 comment on commit 3fe0818

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.