Jackie-Jiang commented on code in PR #9191:
URL: https://github.com/apache/pinot/pull/9191#discussion_r948298984


##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java:
##########
@@ -168,6 +167,13 @@ private String getDefaultBrokerId() {
     }
   }
 
+  @Override
+  public BrokerResponseNative handleRequest(JsonNode request, @Nullable 
RequesterIdentity requesterIdentity,

Review Comment:
   Suggest adding `getResultTable()` into the `ResponseNative` interface, 
instead of relying on the implementation to return the `BrokerResponseNative`



##########
pinot-common/src/main/java/org/apache/pinot/common/utils/request/RequestUtils.java:
##########
@@ -30,13 +33,73 @@
 import org.apache.pinot.common.request.Literal;
 import org.apache.pinot.common.request.PinotQuery;
 import org.apache.pinot.spi.utils.BytesUtils;
+import org.apache.pinot.spi.utils.CommonConstants;
 import org.apache.pinot.sql.FilterKind;
+import org.apache.pinot.sql.parsers.CalciteSqlParser;
+import org.apache.pinot.sql.parsers.SqlCompilationException;
+import org.apache.pinot.sql.parsers.SqlNodeAndOptions;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 public class RequestUtils {
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(RequestUtils.class);
+
   private RequestUtils() {
   }
 
+  public static SqlNodeAndOptions parseQuery(long requestId, String query, 
JsonNode request)

Review Comment:
   Let's not pass in `requestId` since it is specific to the broker, and only 
for logging purpose. If necessary, we can log the options in the broker request 
handler.



##########
pinot-common/src/main/java/org/apache/pinot/sql/parsers/SqlNodeAndOptions.java:
##########
@@ -23,17 +23,25 @@
 
 
 public class SqlNodeAndOptions {
+  private String _sql;
   private final SqlNode _sqlNode;
   private final PinotSqlType _sqlType;
   // TODO: support option literals other than STRING
-  private final Map<String, String> _options;
-
+  private final Map<String, String> _queryOptions;
+  private final Map<String, String> _debugOptions;

Review Comment:
   Let's not add debug options here. We don't want to separate debug options 
and query options because it is quite hard to use.



-- 
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]

Reply via email to