You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ha...@apache.org on 2023/01/03 15:05:13 UTC
[skywalking-banyandb-java-client] branch measure updated (46d1883 -> a377b45)
This is an automated email from the ASF dual-hosted git repository.
hanahmily pushed a change to branch measure
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb-java-client.git
discard 46d1883 Remove ID amendation
new a377b45 Remove ID amendation
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (46d1883)
\
N -- N -- N refs/heads/measure (a377b45)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../apache/skywalking/banyandb/v1/client/MeasureQuery.java | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
[skywalking-banyandb-java-client] 01/01: Remove ID amendation
Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
hanahmily pushed a commit to branch measure
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb-java-client.git
commit a377b45271bbc1bb4db4d4784a53552e155edbab
Author: Gao Hongtao <ha...@gmail.com>
AuthorDate: Tue Jan 3 22:38:02 2023 +0800
Remove ID amendation
Signed-off-by: Gao Hongtao <ha...@gmail.com>
---
.../banyandb/v1/client/MeasureQuery.java | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/src/main/java/org/apache/skywalking/banyandb/v1/client/MeasureQuery.java b/src/main/java/org/apache/skywalking/banyandb/v1/client/MeasureQuery.java
index 14caca0..6f3799e 100644
--- a/src/main/java/org/apache/skywalking/banyandb/v1/client/MeasureQuery.java
+++ b/src/main/java/org/apache/skywalking/banyandb/v1/client/MeasureQuery.java
@@ -20,13 +20,11 @@ package org.apache.skywalking.banyandb.v1.client;
import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
-import com.google.common.collect.ImmutableSet;
import lombok.RequiredArgsConstructor;
import lombok.Setter;
import org.apache.skywalking.banyandb.measure.v1.BanyandbMeasure;
import org.apache.skywalking.banyandb.model.v1.BanyandbModel;
import org.apache.skywalking.banyandb.v1.client.grpc.exception.BanyanDBException;
-import org.apache.skywalking.banyandb.v1.client.metadata.Measure;
import java.util.Set;
@@ -55,7 +53,7 @@ public class MeasureQuery extends AbstractQuery<BanyandbMeasure.QueryRequest> {
}
public MeasureQuery(final String group, final String name, final TimestampRange timestampRange, final Set<String> tagProjections, final Set<String> fieldProjections) {
- super(group, name, timestampRange, addIDProjection(tagProjections));
+ super(group, name, timestampRange, tagProjections);
this.fieldProjections = fieldProjections;
}
@@ -152,10 +150,15 @@ public class MeasureQuery extends AbstractQuery<BanyandbMeasure.QueryRequest> {
} else {
builder.setTimeRange(TimestampRange.MAX_RANGE);
}
- builder.setTagProjection(buildTagProjections());
- builder.setFieldProjection(BanyandbMeasure.QueryRequest.FieldProjection.newBuilder()
- .addAllNames(fieldProjections)
- .build());
+ BanyandbModel.TagProjection tagProjections = buildTagProjections();
+ if (tagProjections.getTagFamiliesCount() > 0) {
+ builder.setTagProjection(buildTagProjections());
+ }
+ if (!fieldProjections.isEmpty()) {
+ builder.setFieldProjection(BanyandbMeasure.QueryRequest.FieldProjection.newBuilder()
+ .addAllNames(fieldProjections)
+ .build());
+ }
if (this.aggregation != null) {
BanyandbMeasure.QueryRequest.GroupBy.Builder groupByBuilder = BanyandbMeasure.QueryRequest.GroupBy.newBuilder()
.setTagProjection(buildTagProjections(this.aggregation.groupByTagsProjection));
@@ -217,9 +220,4 @@ public class MeasureQuery extends AbstractQuery<BanyandbMeasure.QueryRequest> {
private final BanyandbModel.AggregationFunction function;
}
}
-
- static ImmutableSet<String> addIDProjection(Set<String> tagProjections) {
- // make a defensive copy in case the original one is immutable
- return ImmutableSet.<String>builder().addAll(tagProjections).add(Measure.ID).build();
- }
}