walterddr commented on code in PR #11944:
URL: https://github.com/apache/pinot/pull/11944#discussion_r1381133225
##########
pinot-broker/src/main/java/org/apache/pinot/broker/api/resources/PinotClientRequest.java:
##########
@@ -316,12 +316,22 @@ private BrokerResponse executeSqlQuery(ObjectNode
sqlRequestJson, HttpRequesterI
try (RequestScope requestStatistics =
Tracing.getTracer().createRequestScope()) {
return _requestHandler.handleRequest(sqlRequestJson,
sqlNodeAndOptions, httpRequesterIdentity,
requestStatistics, httpHeaders);
+ } catch (Exception e) {
+ LOGGER.error("Error handling DQL request:\n{}\nException: {}",
sqlRequestJson,
+ QueryException.getTruncatedStackTrace(e));
+ throw e;
}
case DML:
- Map<String, String> headers = new HashMap<>();
- httpRequesterIdentity.getHttpHeaders().entries()
- .forEach(entry -> headers.put(entry.getKey(), entry.getValue()));
- return _sqlQueryExecutor.executeDMLStatement(sqlNodeAndOptions,
headers);
+ try {
+ Map<String, String> headers = new HashMap<>();
+ httpRequesterIdentity.getHttpHeaders().entries()
+ .forEach(entry -> headers.put(entry.getKey(), entry.getValue()));
+ return _sqlQueryExecutor.executeDMLStatement(sqlNodeAndOptions,
headers);
+ } catch (Exception e) {
+ LOGGER.error("Error handling DQL request:\n{}\nException: {}",
sqlRequestJson,
Review Comment:
```suggestion
LOGGER.error("Error handling DML request:\n{}\nException: {}",
sqlRequestJson,
```
--
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]