xiangfu0 commented on code in PR #20336:
URL: https://github.com/apache/pinot/pull/20336#discussion_r4650177626
##########
pinot-broker/src/main/java/org/apache/pinot/broker/api/resources/PinotClientRequest.java:
##########
@@ -1029,6 +1029,13 @@ private QueryFingerprint
generateQueryFingerprint(ObjectNode sqlRequestJson) thr
return fingerprint;
}
+ private static Response timeSeriesErrorResponse(QueryException e, Object
entity) {
Review Comment:
Yes. The broker now returns HTTP 403 for an access denial on both
time-series endpoints. Other query errors retain their existing HTTP status so
this change preserves compatibility for clients that read the error body. A
timeout before the first server reply now keeps its SERVER_NOT_RESPONDING
error. Mapping that timeout to HTTP 503 and defining statuses for the other
query errors can be handled together in a follow-up.
##########
pinot-common/src/main/java/org/apache/pinot/common/response/PinotBrokerTimeSeriesResponse.java:
##########
@@ -134,11 +135,16 @@ private static PinotBrokerTimeSeriesResponse
convertBucketedSeriesBlock(TimeSeri
metricMap.putAll(anySeries.getTagKeyValuesAsMap());
for (TimeSeries timeSeries : listOfTimeSeries) {
Object[][] values = new Object[timeValues.length][];
+ int numSamples = 0;
for (int i = 0; i < timeValues.length; i++) {
- Object nullableValue = timeSeries.getDoubleValues()[i];
- values[i] = new Object[]{timeValues[i], nullableValue == null ? null
: nullableValue.toString()};
+ Double sample = timeSeries.getDoubleValues()[i];
+ if (sample != null) {
+ values[numSamples++] = new Object[]{timeValues[i],
sample.toString()};
+ }
+ }
+ if (numSamples > 0) {
Review Comment:
Added the release-notes label. The PR description records the client-visible
change: the range API omits missing timestamps and series with no samples.
Numeric zero and NaN remain present.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]