File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
infrastructure/src/main/java/scala/bench Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 6
6
import org .influxdb .dto .Query ;
7
7
import org .influxdb .dto .QueryResult ;
8
8
9
- import java .io .IOException ;
10
9
import java .time .Instant ;
11
10
import java .util .*;
12
11
import java .util .concurrent .TimeUnit ;
@@ -54,7 +53,13 @@ public static void main(String[] args) {
54
53
LinkedHashMap <String , Object > newFieldsMap = new LinkedHashMap <>();
55
54
assert (newFieldNames .size () == newValues .size ());
56
55
for (int i = 0 ; i < newFieldNames .size (); i ++) {
57
- newFieldsMap .put (newFieldNames .get (i ), newValues .get (i ));
56
+ String fieldName = newFieldNames .get (i );
57
+ boolean isLong = fieldName .equals ("sampleCount" );
58
+ if (isLong ) {
59
+ newFieldsMap .put (fieldName , ((Number ) newValues .get (i )).longValue ());
60
+ } else {
61
+ newFieldsMap .put (fieldName , newValues .get (i ));
62
+ }
58
63
}
59
64
builder .fields (newFieldsMap );
60
65
Instant parse = Instant .parse (time );
You can’t perform that action at this time.
0 commit comments