Dmitry Lychagin has posted comments on this change. Change subject: [NO ISSUE][API] added parse-only request parameter ......................................................................
Patch Set 4: (7 comments) https://asterix-gerrit.ics.uci.edu/#/c/3085/4//COMMIT_MSG Commit Message: Line 9: - user model changes: parse-only request parameter has been added remove leading whitespace from this and following lines in the commit message https://asterix-gerrit.ics.uci.edu/#/c/3085/4/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ResultUtil.java File asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/server/ResultUtil.java: Line 406: extVarsSerialized = extVarsSerialized.replaceAll(",$", "]"); we should not use regex just to replace that last "," with "]". Let's just not add the last "," in the loop, and then add "]" after the loop https://asterix-gerrit.ics.uci.edu/#/c/3085/4/asterixdb/asterix-app/src/test/resources/runtimets/results/parseonly/001/parseonly_01.5.adm File asterixdb/asterix-app/src/test/resources/runtimets/results/parseonly/001/parseonly_01.5.adm: Line 1: {"statement-parameters":["1","2","p_int","p_str"]} positional variables should be returned as integers, not as strings. So this result array should be [1,2,"p_int","p_str"] https://asterix-gerrit.ics.uci.edu/#/c/3085/4/asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/IQueryRewriter.java File asterixdb/asterix-lang-common/src/main/java/org/apache/asterix/lang/common/base/IQueryRewriter.java: Line 57: Set<VariableExpr> getFreeVariables(Expression expr) throws CompilationException; We don't need this method in the API because QueryServiceServlet only uses getExternalVariables(). So let's remove this one. Line 59: Set<VariableExpr> getExternalVariables(Expression expr) throws CompilationException; let's add javadoc. other methods in this interface have it. https://asterix-gerrit.ics.uci.edu/#/c/3085/4/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/SqlppQueryRewriter.java File asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/rewrites/SqlppQueryRewriter.java: Line 261: public Set<VariableExpr> getFreeVariables(Expression expr) throws CompilationException { let's remove this method because it's not used by the QueryServiceServlet. We'll use SqllppVariableUtil.getFreeVariables() in getExternalVariables() below Line 270: Set<VariableExpr> freeVars = getFreeVariables(expr); Use SqlppVariableUtil.getFreeVariables() -- To view, visit https://asterix-gerrit.ics.uci.edu/3085 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idd2f461c22b05a5fcaa50a6e4f9b7dcd91acc184 Gerrit-PatchSet: 4 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: sandeep.gu...@couchbase.com Gerrit-Reviewer: Anon. E. Moose #1000171 Gerrit-Reviewer: Dmitry Lychagin <dmitry.lycha...@couchbase.com> Gerrit-Reviewer: Jenkins <jenk...@fulliautomatix.ics.uci.edu> Gerrit-Reviewer: Till Westmann <ti...@apache.org> Gerrit-HasComments: Yes